Skip to content

Commit

Permalink
net: cdc_ncm: return proper error if setup fails
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Bjørn Mork authored and David S. Miller committed Nov 2, 2013
1 parent 47175e5 commit 59ede31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/usb/cdc_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 59ede31

Please sign in to comment.