From 1482b7be25ec64e3763f2a1702f4b984dbe76844 Mon Sep 17 00:00:00 2001 From: Max Krummenacher Date: Wed, 17 Jan 2018 09:51:47 +0100 Subject: 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 Acked-by: Marcel Ziswiler --- drivers/thermal/imx_thermal.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers') 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; } -- cgit v1.2.3