aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavitrakumar Managutte <pavitra1729@gmail.com>2014-10-27 13:19:26 -0400
committerFelipe Balbi <balbi@ti.com>2014-11-03 11:01:24 -0500
commit8b920f16e69550d3f6c7c67dc3cef42aafca498d (patch)
treec6842ce1dc4d3d8ef305bce9911e0ee571919881
parent3e87d9a3dee0ad5416c3fb599a6019a24bfe6e64 (diff)
usb: gadget: function: Added usb_assign_descriptors failure check
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>
-rw-r--r--drivers/usb/gadget/function/f_ncm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/gadget/function/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c
index 16361b0a8b46..bdcda9f5148e 100644
--- a/drivers/usb/gadget/function/f_ncm.c
+++ b/drivers/usb/gadget/function/f_ncm.c
@@ -1441,6 +1441,9 @@ static int ncm_bind(struct usb_configuration *c, struct usb_function *f)
1441 1441
1442 status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function, 1442 status = usb_assign_descriptors(f, ncm_fs_function, ncm_hs_function,
1443 NULL); 1443 NULL);
1444 if (status)
1445 goto fail;
1446
1444 /* 1447 /*
1445 * NOTE: all that is done without knowing or caring about 1448 * NOTE: all that is done without knowing or caring about
1446 * the network link ... which is unavailable to this code 1449 * the network link ... which is unavailable to this code