From: John Youn Date: Thu, 28 Apr 2016 03:20:56 +0000 (-0700) Subject: usb: dwc2: Proper cleanup on dr_mode failure X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a6ef3e02542a33fb705e6977221deb0292b27398;p=linux-beck.git usb: dwc2: Proper cleanup on dr_mode failure Cleanup in probe if we fail to get dr_mode. Signed-off-by: John Youn Signed-off-by: Felipe Balbi --- diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 88629bed6614..fc6f5251de5d 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -562,7 +562,7 @@ static int dwc2_driver_probe(struct platform_device *dev) retval = dwc2_get_dr_mode(hsotg); if (retval) - return retval; + goto error; /* * Reset before dwc2_get_hwparams() then it could get power-on real