diff options
author | Max Krummenacher <max.krummenacher@toradex.com> | 2018-01-17 09:51:47 +0100 |
---|---|---|
committer | Max Krummenacher <max.krummenacher@toradex.com> | 2018-03-08 14:52:56 +0100 |
commit | 1482b7be25ec64e3763f2a1702f4b984dbe76844 (patch) | |
tree | 864f53f37f752914ec2e15ef8816db3fc50a46e3 /drivers | |
parent | a89d791976dd123462d34d4795839fdd0a64964c (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')
-rw-r--r-- | drivers/thermal/imx_thermal.c | 3 |
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; } |