aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhen Lei <[email protected]>2021-05-08 09:53:10 +0800
committerGreg Kroah-Hartman <[email protected]>2021-05-10 14:58:41 +0200
commit0b2b149e918f6dddb4ea53615551bf7bc131f875 (patch)
tree7143eaa93fda70f5263d9d8054bc44ef9990c34d
parentb96992081fde19806b5beb5b25f9327820ead77b (diff)
usb: dwc3: imx8mp: fix error return code in dwc3_imx8mp_probe()
Fix to return a negative error code from the error handling case instead of 0, as done elsewhere in this function. Fixes: 6dd2565989b4 ("usb: dwc3: add imx8mp dwc3 glue layer driver") Reported-by: Hulk Robot <[email protected]> Acked-by: Felipe Balbi <[email protected]> Signed-off-by: Zhen Lei <[email protected]> Cc: stable <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/usb/dwc3/dwc3-imx8mp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/dwc3-imx8mp.c b/drivers/usb/dwc3/dwc3-imx8mp.c
index e9fced6f7a7c..756faa46d33a 100644
--- a/drivers/usb/dwc3/dwc3-imx8mp.c
+++ b/drivers/usb/dwc3/dwc3-imx8mp.c
@@ -167,6 +167,7 @@ static int dwc3_imx8mp_probe(struct platform_device *pdev)
dwc3_np = of_get_compatible_child(node, "snps,dwc3");
if (!dwc3_np) {
+ err = -ENODEV;
dev_err(dev, "failed to find dwc3 core child\n");
goto disable_rpm;
}