From mboxrd@z Thu Jan 1 00:00:00 1970 From: Louis Yu Subject: [PATCH v2 4/4] thermal: mediatek: minor mtk_thermal.c cleanups Date: Tue, 1 Aug 2017 15:28:33 +0800 Message-ID: <1501572513-7958-5-git-send-email-louis.yu@mediatek.com> References: <1501572513-7958-1-git-send-email-louis.yu@mediatek.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1501572513-7958-1-git-send-email-louis.yu@mediatek.com> Sender: linux-pm-owner@vger.kernel.org To: Zhang Rui , Eduardo Valentin , Matthias Brugger Cc: Rob Herring , Mark Rutland , Dawei Chien , Fan Chen , Eddie Huang , linux-pm@vger.kernel.org, linux-mediatek@lists.infradead.org, srv_heupstream@mediatek.com, Louis Yu List-Id: linux-mediatek@lists.infradead.org Move independent thermal module reset in the beginning. Signed-off-by: Louis Yu --- drivers/thermal/mtk_thermal.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/thermal/mtk_thermal.c b/drivers/thermal/mtk_thermal.c index b609589..1e61c09 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); -- 1.8.1.1.dirty