summaryrefslogtreecommitdiffstats
path: root/drivers/thermal
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal')
-rw-r--r--drivers/thermal/imx8mm_thermal.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index ce7cb6452c52..7442e013738f 100644
--- 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)