소스 검색

usb: dwc2: Proper cleanup on dr_mode failure

Cleanup in probe if we fail to get dr_mode.

Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
John Youn 9 년 전
부모
커밋
a6ef3e0254
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      drivers/usb/dwc2/platform.c

+ 1 - 1
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