summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/cdc_ncm.c
diff options
context:
space:
mode:
authorBjørn Mork <bjorn@mork.no>2013-11-01 11:16:59 +0100
committerDavid S. Miller <davem@davemloft.net>2013-11-02 02:02:04 -0400
commit59ede3168a0b3fe02f82a7bed52432f18dbb1070 (patch)
treeb88d31a1c3899d822ae2df31b09a763f509061b6 /drivers/net/usb/cdc_ncm.c
parent47175e5f283f8c78ff325edde0aec2018ce607e5 (diff)
downloadop-kernel-dev-59ede3168a0b3fe02f82a7bed52432f18dbb1070.zip
op-kernel-dev-59ede3168a0b3fe02f82a7bed52432f18dbb1070.tar.gz
net: cdc_ncm: return proper error if setup fails
Most setup errors are ignored to ensure maximum firmware compatibilty. But GET_NTB_PARAMETERS and the functional descriptors are required. Use proper error codes and log level if these fail. Cc: Alexey Orishko <alexey.orishko@gmail.com> Signed-off-by: Bjørn Mork <bjorn@mork.no> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/cdc_ncm.c')
-rw-r--r--drivers/net/usb/cdc_ncm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/usb/cdc_ncm.c b/drivers/net/usb/cdc_ncm.c
index 62dcb2e..f168bc8c 100644
--- a/drivers/net/usb/cdc_ncm.c
+++ b/drivers/net/usb/cdc_ncm.c
@@ -86,8 +86,8 @@ static u8 cdc_ncm_setup(struct usbnet *dev)
0, iface_no, &ncm_parm,
sizeof(ncm_parm));
if (err < 0) {
- dev_dbg(&dev->intf->dev, "failed GET_NTB_PARAMETERS\n");
- return 1;
+ dev_err(&dev->intf->dev, "failed GET_NTB_PARAMETERS\n");
+ return err; /* GET_NTB_PARAMETERS is required */
}
/* read correct set of parameters according to device mode */
OpenPOWER on IntegriCloud