Skip to content

Commit

Permalink
usb: gadget: function: Added usb_assign_descriptors failure check
Browse files Browse the repository at this point in the history
Added failure check for usb_assign_descriptors call in bind function.

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 Nov 3, 2014
1 parent 3e87d9a commit 8b920f1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/usb/gadget/function/f_ncm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,6 +1441,9 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)

status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function,
NULL);
if (status)
goto fail;

/*
* 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 8b920f1

Please sign in to comment.