From: Marc Kleine-Budde Date: Wed, 12 Sep 2012 11:58:02 +0000 (+0300) Subject: usb: chipidea: udc: fix error path in udc_start() X-Git-Tag: v3.5.5~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b739070c21f7279c4e508d4af7c5752b345966cb;p=thirdparty%2Fkernel%2Fstable.git usb: chipidea: udc: fix error path in udc_start() commit c9d1f947a85e38b6dded469470c95ed62430cb3f upstream. This patch fixes the error path of udc_start(). Now NULL is used to unset the peripheral with otg_set_peripheral(). Cc: stable Reviewed-by: Richard Zhao Signed-off-by: Marc Kleine-Budde Signed-off-by: Alexander Shishkin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 6486d5ec1947d..90d9f43da325a 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1747,7 +1747,7 @@ static int udc_start(struct ci13xxx *udc) remove_trans: if (udc->transceiver) { - otg_set_peripheral(udc->transceiver->otg, &udc->gadget); + otg_set_peripheral(udc->transceiver->otg, NULL); usb_put_transceiver(udc->transceiver); }