diff options
author | Pavitrakumar Managutte <pavitra1729@gmail.com> | 2014-10-22 18:03:22 +0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-10-23 23:49:35 +0400 |
commit | 9b1763553a89b2a84881119eeabfccdb803bb468 (patch) | |
tree | b963040d5e02eadb9546a6caee16ea02cec2579e /drivers/usb/gadget/function/f_rndis.c | |
parent | 3a8146aafcedd93e42045598802e1eb71cae68c0 (diff) | |
download | linux-9b1763553a89b2a84881119eeabfccdb803bb468.tar.xz |
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/gadget/function/f_rndis.c')
-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 2f0517f5bae3..f13fc6a58565 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 |