]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
net: cdc_ncm: fix error path for single interface probing
authorBjørn Mork <bjorn@mork.no>
Mon, 21 Jan 2013 05:50:40 +0000 (05:50 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 21 Jan 2013 19:21:18 +0000 (14:21 -0500)
commit bbc8d92 (net: cdc_ncm: add Huawei devices) implemented
support for devices with a single combined control and data
interface. Fix up the error path so that we do not double
release such interfaces in case of probing failures.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/usb/cdc_ncm.c

index 4041159f6c98f316a56e50ad478e130ec9c6f2fb..2c4b41ffddb6ac9a127921e31d7b0ed9407aa153 100644 (file)
@@ -524,7 +524,8 @@ advance:
 error2:
        usb_set_intfdata(ctx->control, NULL);
        usb_set_intfdata(ctx->data, NULL);
-       usb_driver_release_interface(driver, ctx->data);
+       if (ctx->data != ctx->control)
+               usb_driver_release_interface(driver, ctx->data);
 error:
        cdc_ncm_free((struct cdc_ncm_ctx *)dev->data[0]);
        dev->data[0] = 0;