From: John Youn Date: Thu, 28 Apr 2016 03:20:56 +0000 (-0700) Subject: UPSTREAM: usb: dwc2: Proper cleanup on dr_mode failure X-Git-Tag: firefly_0821_release~854 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=0138d6e4886c3658fcc546bc4f2ccb1328a311c0;p=firefly-linux-kernel-4.4.55.git UPSTREAM: usb: dwc2: Proper cleanup on dr_mode failure Cleanup in probe if we fail to get dr_mode. Change-Id: I8b2f1cf210b9baa6fc81bddd9b64be1bf5e657fb Signed-off-by: John Youn Signed-off-by: Felipe Balbi Signed-off-by: Huang, Tao (cherry picked from commit a6ef3e02542a33fb705e6977221deb0292b27398) --- diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index da2824581b08..0cb69c439d3a 100644 --- a/drivers/usb/dwc2/platform.c +++ b/drivers/usb/dwc2/platform.c @@ -571,7 +571,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