summaryrefslogtreecommitdiff
path: root/drivers/thermal
diff options
context:
space:
mode:
authorMax Krummenacher <max.krummenacher@toradex.com>2018-01-17 09:51:47 +0100
committerPhilippe Schenker <philippe.schenker@toradex.com>2019-05-24 11:34:16 +0200
commit5f6952acf04bee8054273801a5f9db66e57c13ff (patch)
tree3fe4083f41a7ff1ad6dcbf047e1991d55fc17363 /drivers/thermal
parentf77e28fed7f4d0fe98d5f8661073920393e4d0e3 (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> (cherry picked from commit 4f01669410997d2536722c082288ca466ee2031e) Conflicts: drivers/thermal/imx_thermal.c Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
Diffstat (limited to 'drivers/thermal')
-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 deb2d16f893f..5971977b4618 100644
--- a/drivers/thermal/imx_thermal.c
+++ b/drivers/thermal/imx_thermal.c
@@ -834,7 +834,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]);
}
@@ -848,6 +848,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]);
cpufreq_cpu_put(data->policy);
return ret;
}