]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
usb: chipidea: udc: fix error path in udc_start()
authorMarc Kleine-Budde <mkl@pengutronix.de>
Wed, 12 Sep 2012 11:58:02 +0000 (14:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Oct 2012 17:40:02 +0000 (10:40 -0700)
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 <stable@vger.kernel.org>
Reviewed-by: Richard Zhao <richard.zhao@freescale.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/chipidea/udc.c

index 6486d5ec1947db120cc057a2c792323caf79c2bc..90d9f43da325a75b2decce0412916bc24a6a5f19 100644 (file)
@@ -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);
        }