diff options
author | Bjørn Mork <bjorn@mork.no> | 2013-01-21 05:50:40 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-01-21 14:21:18 -0500 |
commit | 6b4ef60299e30daa8643218fde6152d8a01e2d4b (patch) | |
tree | 577c3d994d443afb01e707471cc6f5bba223d7ef | |
parent | 328d7b8a4ab045484e1cc09579abf13c8c6223e3 (diff) | |
download | blackbird-op-linux-6b4ef60299e30daa8643218fde6152d8a01e2d4b.tar.gz blackbird-op-linux-6b4ef60299e30daa8643218fde6152d8a01e2d4b.zip |
net: cdc_ncm: fix error path for single interface probing
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>
-rw-r--r-- | drivers/net/usb/cdc_ncm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c index 4041159f6c98..2c4b41ffddb6 100644 --- a/drivers/net/usb/cdc_ncm.c +++ b/drivers/net/usb/cdc_ncm.c @@ -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; |