From patchwork Mon Sep 21 13:11:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qinglang Miao X-Patchwork-Id: 11789775 X-Patchwork-Delegate: daniel.lezcano@linaro.org Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 990B11668 for ; Mon, 21 Sep 2020 13:11:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8A98421BE5 for ; Mon, 21 Sep 2020 13:11:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbgIUNLg (ORCPT ); Mon, 21 Sep 2020 09:11:36 -0400 Received: from szxga05-in.huawei.com ([45.249.212.191]:14202 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727455AbgIUNKz (ORCPT ); Mon, 21 Sep 2020 09:10:55 -0400 Received: from DGGEMS412-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 0894D7546E7C1BE89E59; Mon, 21 Sep 2020 21:10:54 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS412-HUB.china.huawei.com (10.3.19.212) with Microsoft SMTP Server id 14.3.487.0; Mon, 21 Sep 2020 21:10:44 +0800 From: Qinglang Miao To: Zhang Rui , Daniel Lezcano , Amit Kucheria , "Maxime Coquelin" , Alexandre Torgue CC: , , , , Qinglang Miao Subject: [PATCH -next] thermal: stm32: simplify the return expression of stm_thermal_prepare() Date: Mon, 21 Sep 2020 21:11:07 +0800 Message-ID: <20200921131107.93273-1-miaoqinglang@huawei.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Simplify the return expression. Signed-off-by: Qinglang Miao --- drivers/thermal/st/stm_thermal.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/thermal/st/stm_thermal.c b/drivers/thermal/st/stm_thermal.c index 331e2b768..5fd3fb891 100644 --- a/drivers/thermal/st/stm_thermal.c +++ b/drivers/thermal/st/stm_thermal.c @@ -446,14 +446,9 @@ static int stm_thermal_prepare(struct stm_thermal_sensor *sensor) #ifdef CONFIG_PM_SLEEP static int stm_thermal_suspend(struct device *dev) { - int ret; struct stm_thermal_sensor *sensor = dev_get_drvdata(dev); - ret = stm_thermal_sensor_off(sensor); - if (ret) - return ret; - - return 0; + return stm_thermal_sensor_off(sensor); } static int stm_thermal_resume(struct device *dev)