[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <1454503191-11796-5-git-send-email-r.baldyga@samsung.com>
Date: Wed, 03 Feb 2016 13:39:12 +0100
From: Robert Baldyga <r.baldyga@...sung.com>
To: balbi@...com
Cc: gregkh@...uxfoundation.org, andrzej.p@...sung.com,
m.szyprowski@...sung.com, b.zolnierkie@...sung.com,
linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org,
Robert Baldyga <r.baldyga@...sung.com>
Subject: [PATCH v4 04/43] usb: gadget: configfs: fix error path
As usb_gstrings_attach() failure can happen when some USB functions are
are already added to some configurations (in previous loop iterations),
we should always call purge_configs_funcs() to be sure that failure is
be handled properly.
Signed-off-by: Robert Baldyga <r.baldyga@...sung.com>
---
drivers/usb/gadget/configfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/gadget/configfs.c b/drivers/usb/gadget/configfs.c
index 590c449..fb3c9ba 100644
--- a/drivers/usb/gadget/configfs.c
+++ b/drivers/usb/gadget/configfs.c
@@ -1345,7 +1345,7 @@ static int configfs_composite_bind(struct usb_gadget *gadget,
s = usb_gstrings_attach(&gi->cdev, cfg->gstrings, 1);
if (IS_ERR(s)) {
ret = PTR_ERR(s);
- goto err_comp_cleanup;
+ goto err_purge_funcs;
}
c->iConfiguration = s[0].id;
}
--
1.9.1
Powered by blists - more mailing lists