[PATCH 14/23] USB: gadget: DFU: free resources when usb_gadget_poll fails

Sascha Hauer s.hauer at pengutronix.de
Mon Jul 21 08:14:38 PDT 2014


Make sure usb_composite_unregister() is called after usb_composite_probe()

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

diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/dfu.c
index 616d7ad..1d35f50 100644
--- a/drivers/usb/gadget/dfu.c
+++ b/drivers/usb/gadget/dfu.c
@@ -777,7 +777,7 @@ int usb_dfu_register(struct usb_dfu_pdata *pdata)
 	while (1) {
 		ret = usb_gadget_poll();
 		if (ret < 0)
-			return ret;
+			goto out;
 
 		if (ctrlc() || dfudetach)
 			goto out;
-- 
2.0.1




More information about the barebox mailing list