Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9d1f947 authored by Marc Kleine-Budde's avatar Marc Kleine-Budde Committed by Greg Kroah-Hartman
Browse files

usb: chipidea: udc: fix error path in udc_start()



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: default avatarRichard Zhao <richard.zhao@freescale.com>
Signed-off-by: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: default avatarAlexander Shishkin <alexander.shishkin@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c0a48e6c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1748,7 +1748,7 @@ static int udc_start(struct ci13xxx *ci)

remove_trans:
	if (!IS_ERR_OR_NULL(ci->transceiver)) {
		otg_set_peripheral(ci->transceiver->otg, &ci->gadget);
		otg_set_peripheral(ci->transceiver->otg, NULL);
		if (ci->global_phy)
			usb_put_phy(ci->transceiver);
	}