diff options
author | Pavitrakumar Managutte <pavitra1729@gmail.com> | 2014-10-22 19:33:22 +0530 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-10-23 14:49:35 -0500 |
commit | 9b1763553a89b2a84881119eeabfccdb803bb468 (patch) | |
tree | b963040d5e02eadb9546a6caee16ea02cec2579e /drivers/usb | |
parent | 3a8146aafcedd93e42045598802e1eb71cae68c0 (diff) |
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: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Pavitrakumar Managutte <pavitra1729@gmail.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/gadget/function/f_rndis.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c index 2f0517f5bae..f13fc6a5856 100644 --- a/drivers/usb/gadget/function/f_rndis.c +++ b/drivers/usb/gadget/function/f_rndis.c @@ -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 |