提交 9b176355 编写于 作者: P Pavitrakumar Managutte 提交者: Felipe Balbi

usb: gadget: function: Fixed the return value on error path

Fixed the return value on failure. status variable
is set to 0 at usb_assign_descriptors call and the same is
returned on error which is incorrect.
Acked-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: NPavitrakumar Managutte <pavitra1729@gmail.com>
Signed-off-by: NFelipe Balbi <balbi@ti.com>
上级 3a8146aa
......@@ -802,8 +802,10 @@ rndis_bind(struct usb_configuration *c, struct usb_function *f)
if (rndis->manufacturer && rndis->vendorID &&
rndis_set_param_vendor(rndis->config, rndis->vendorID,
rndis->manufacturer))
rndis->manufacturer)) {
status = -EINVAL;
goto fail_free_descs;
}
/* NOTE: all that is done without knowing or caring about
* the network link ... which is unavailable to this code
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册