Skip to content

Commit 59ede31

Browse files
bmorkdavem330
authored andcommitted
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>
1 parent 47175e5 commit 59ede31

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/usb/cdc_ncm.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ static u8 cdc_ncm_setup(struct usbnet *dev)
8686
0, iface_no, &ncm_parm,
8787
sizeof(ncm_parm));
8888
if (err < 0) {
89-
dev_dbg(&dev->intf->dev, "failed GET_NTB_PARAMETERS\n");
90-
return 1;
89+
dev_err(&dev->intf->dev, "failed GET_NTB_PARAMETERS\n");
90+
return err; /* GET_NTB_PARAMETERS is required */
9191
}
9292

9393
/* read correct set of parameters according to device mode */

0 commit comments

Comments
 (0)