projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ce662cc
)
thermal: imx8mm: Disable the clock on probe failure
author
Fabio Estevam
<festevam@gmail.com>
Wed, 2 Dec 2020 23:24:48 +0000
(20:24 -0300)
committer
Daniel Lezcano
<daniel.lezcano@linaro.org>
Fri, 4 Dec 2020 19:46:03 +0000
(20:46 +0100)
Prior to returning an error in probe, disable the previously
enabled clock.
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link:
https://lore.kernel.org/r/20201202232448.2692-2-festevam@gmail.com
drivers/thermal/imx8mm_thermal.c
patch
|
blob
|
history
diff --git
a/drivers/thermal/imx8mm_thermal.c
b/drivers/thermal/imx8mm_thermal.c
index ce7cb6452c52938e1f37e68ddb30260df3d08717..7442e013738f887020aa861d8cfbe45712942787 100644
(file)
--- a/
drivers/thermal/imx8mm_thermal.c
+++ b/
drivers/thermal/imx8mm_thermal.c
@@
-170,7
+170,7
@@
static int imx8mm_tmu_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"failed to register thermal zone sensor[%d]: %d\n",
i, ret);
-
return ret
;
+
goto disable_clk
;
}
tmu->sensors[i].hw_id = i;
}
@@
-185,6
+185,10
@@
static int imx8mm_tmu_probe(struct platform_device *pdev)
imx8mm_tmu_enable(tmu, true);
return 0;
+
+disable_clk:
+ clk_disable_unprepare(tmu->clk);
+ return ret;
}
static int imx8mm_tmu_remove(struct platform_device *pdev)