summaryrefslogtreecommitdiff
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-24 01:27:31 +0100
commit4f01669410997d2536722c082288ca466ee2031e (patch)
tree6591ce5ac6d0141dc20277b0d182693a48bfb5f2
parent72935ef10746e7894d96c8ae131975bd8a5d4b11 (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>
-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 de4fc8791c6c..9c32c125069c 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;
}