thermal: mediatek: minor mtk_thermal.c cleanups
authorLouis Yu <louis.yu@mediatek.com>
Tue, 1 Aug 2017 07:28:33 +0000 (15:28 +0800)
committerZhang Rui <rui.zhang@intel.com>
Thu, 31 Aug 2017 13:13:53 +0000 (21:13 +0800)
Move independent thermal module reset in the beginning.

Signed-off-by: Louis Yu <louis.yu@mediatek.com>
Reviewed-by: Dawei Chien <dawei.chien@mediatek.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
drivers/thermal/mtk_thermal.c

index b609589698c7318734e707ecf107ecf29c40782f..1e61c09153c9abf0d02eb43d4ff21ba925da9415 100644 (file)
@@ -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);