提交 59ede316 编写于 作者: B Bjørn Mork 提交者: David S. Miller

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: NBjørn Mork <bjorn@mork.no>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 47175e5f
...@@ -86,8 +86,8 @@ static u8 cdc_ncm_setup(struct usbnet *dev) ...@@ -86,8 +86,8 @@ static u8 cdc_ncm_setup(struct usbnet *dev)
0, iface_no, &ncm_parm, 0, iface_no, &ncm_parm,
sizeof(ncm_parm)); sizeof(ncm_parm));
if (err < 0) { if (err < 0) {
dev_dbg(&dev->intf->dev, "failed GET_NTB_PARAMETERS\n"); dev_err(&dev->intf->dev, "failed GET_NTB_PARAMETERS\n");
return 1; return err; /* GET_NTB_PARAMETERS is required */
} }
/* read correct set of parameters according to device mode */ /* read correct set of parameters according to device mode */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册