USB: OTG: msm: Fix error handling in probe
If clk_get on core_clk fails in probe function, the return value
is incorrectly assigned. Assign the ret variable to the error
code returned for core_clk not alt_core_clk.
Change-Id: Icca82e8e44cd40149205c246f427ab82e4656268
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
diff --git a/drivers/usb/otg/msm_otg.c b/drivers/usb/otg/msm_otg.c
index 41eeee1..aebf995 100644
--- a/drivers/usb/otg/msm_otg.c
+++ b/drivers/usb/otg/msm_otg.c
@@ -3260,7 +3260,7 @@
if (IS_ERR(motg->core_clk)) {
motg->core_clk = NULL;
dev_err(&pdev->dev, "failed to get core_clk\n");
- ret = PTR_ERR(motg->clk);
+ ret = PTR_ERR(motg->core_clk);
goto put_clk;
}
clk_set_rate(motg->core_clk, INT_MAX);