From: Louis Yu Date: Tue, 1 Aug 2017 07:28:33 +0000 (+0800) Subject: thermal: mediatek: minor mtk_thermal.c cleanups X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=6760f3f74e72d690bc47b8a1ca1716d2f2e4ad74;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git thermal: mediatek: minor mtk_thermal.c cleanups Move independent thermal module reset in the beginning. Signed-off-by: Louis Yu Reviewed-by: Dawei Chien Signed-off-by: Zhang Rui --- diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c index b609589698c7..1e61c09153c9 100644 --- a/drivers/thermal/mtk_thermal.c +++ b/drivers/thermal/mtk_thermal.c @@ -712,16 +712,16 @@ static int mtk_thermal_probe(struct platform_device *pdev) return -EINVAL; } + ret = device_reset(&pdev->dev); + if (ret) + return ret; + ret = clk_prepare_enable(mt->clk_auxadc); if (ret) { dev_err(&pdev->dev, "Can't enable auxadc clk: %d\n", ret); return ret; } - ret = device_reset(&pdev->dev); - if (ret) - goto err_disable_clk_auxadc; - ret = clk_prepare_enable(mt->clk_peri_therm); if (ret) { dev_err(&pdev->dev, "Can't enable peri clk: %d\n", ret);