[PATCH 2/2] usb: gadget: propagate error code from usb_composite_register

Sascha Hauer s.hauer at pengutronix.de
Wed Mar 19 11:17:10 EDT 2014


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/usb/gadget/dfu.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c
index 76b5def..d0f2155 100644
--- a/drivers/usb/gadget/dfu.c
+++ b/drivers/usb/gadget/dfu.c
@@ -703,7 +703,9 @@ int usb_dfu_register(struct usb_dfu_pdata *pdata)
 	strings_dev[STRING_MANUFACTURER_IDX].s = pdata->manufacturer;
 	strings_dev[STRING_PRODUCT_IDX].s = pdata->productname;
 
-	usb_composite_register(&dfu_driver);
+	ret = usb_composite_register(&dfu_driver);
+	if (ret)
+		return ret;
 
 	while (1) {
 		ret = usb_gadget_poll();
-- 
1.9.0




More information about the barebox mailing list