This patch fixes the error path of udc_start(). Now NULL is used to
unset the peripheral with otg_set_peripheral().
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
---
drivers/usb/chipidea/udc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c
index 5760a10..adcc77d 100644
--- a/drivers/usb/chipidea/udc.c
+++ b/drivers/usb/chipidea/udc.c
@@ -1739,7 +1739,7 @@ static int udc_start(struct ci13xxx *ci)
remove_trans:
if (ci->transceiver) {
- otg_set_peripheral(ci->transceiver->otg, &ci->gadget);
+ otg_set_peripheral(ci->transceiver->otg, NULL);
if (ci->global_phy)
usb_put_transceiver(ci->transceiver);
}--
1.7.10