Skip to content

Commit

Permalink
usb: gadget: function: Fixed the return value on error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pavitrakumar Managutte authored and Felipe Balbi committed Oct 23, 2014
1 parent 3a8146a commit 9b17635
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/usb/gadget/function/f_rndis.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9b17635

Please sign in to comment.