summaryrefslogtreecommitdiff
path: root/drivers/thermal/imx_thermal.c
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2018-01-17 09:51:47 +0100
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2018-12-09 23:11:22 +0100
commitdc65603eb33326266d91abe07f28a14f739e4637 (patch)
tree7f7d62ec63fd0ec5d6a3abc4a14c5d290b362988 /drivers/thermal/imx_thermal.c
parentf2a15fb425a0534b065cce56d373cb785d0812ec (diff)
imx_thermal.c: unregister all ressources in error path
This was seen in code inspection. While at it, fix error text. Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Acked-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Diffstat (limited to 'drivers/thermal/imx_thermal.c')
-rw-r--r--drivers/thermal/imx_thermal.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c
index 586b3f16023e..449d0fb0ce36 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -822,7 +822,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
ret = PTR_ERR(data->cdev[1]);
if (ret != -EPROBE_DEFER) {
dev_err(&pdev->dev,
- "failed to register cpufreq cooling device: %d\n",
+ "failed to register devfreq cooling device: %d\n",
ret);
cpufreq_cooling_unregister(data->cdev[0]);
}
@@ -836,6 +836,7 @@ static int imx_thermal_probe(struct platform_device *pdev)
dev_err(&pdev->dev,
"failed to get thermal clk: %d\n", ret);
cpufreq_cooling_unregister(data->cdev[0]);
+ devfreq_cooling_unregister(data->cdev[1]);
return ret;
}