From patchwork Thu Aug 3 01:23:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Jiahao X-Patchwork-Id: 13339103 X-Patchwork-Delegate: daniel.lezcano@linaro.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A8D9C001DF for ; Thu, 3 Aug 2023 01:24:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232274AbjHCBYi (ORCPT ); Wed, 2 Aug 2023 21:24:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52248 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231269AbjHCBYh (ORCPT ); Wed, 2 Aug 2023 21:24:37 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E5FA30E4 for ; Wed, 2 Aug 2023 18:24:12 -0700 (PDT) Received: from dggpemm500016.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4RGWLf6ctvzrS7V; Thu, 3 Aug 2023 09:23:06 +0800 (CST) Received: from huawei.com (10.90.53.73) by dggpemm500016.china.huawei.com (7.185.36.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 3 Aug 2023 09:24:10 +0800 From: Chen Jiahao To: , , , , , , , , , , , , CC: Subject: [PATCH -next] thermal/drivers/mediatek: Remove repeating warn msg after devm_thermal_add_hwmon_sysfs() Date: Thu, 3 Aug 2023 09:23:41 +0800 Message-ID: <20230803012341.2388831-1-chenjiahao16@huawei.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [10.90.53.73] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm500016.china.huawei.com (7.185.36.25) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Referring to commit 8416ecfb32923 ("thermal/hwmon: Add error information printing for devm_thermal_add_hwmon_sysfs()"), return value has already been checked if ret != 0 in devm_thermal_add_hwmon_sysfs(). Error handling has also been performed in this case, including print warning message for debugging. Removing dev_warn() following devm_thermal_add_hwmon_sysfs() to clean up redundant warning message. Signed-off-by: Chen Jiahao Reviewed-by: Chen-Yu Tsai --- drivers/thermal/mediatek/auxadc_thermal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/thermal/mediatek/auxadc_thermal.c b/drivers/thermal/mediatek/auxadc_thermal.c index c537aed71017..7f8450c66646 100644 --- a/drivers/thermal/mediatek/auxadc_thermal.c +++ b/drivers/thermal/mediatek/auxadc_thermal.c @@ -1289,9 +1289,7 @@ static int mtk_thermal_probe(struct platform_device *pdev) if (IS_ERR(tzdev)) return PTR_ERR(tzdev); - ret = devm_thermal_add_hwmon_sysfs(&pdev->dev, tzdev); - if (ret) - dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs"); + devm_thermal_add_hwmon_sysfs(&pdev->dev, tzdev); return 0; }