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: 13339102 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00D44C001DE for ; Thu, 3 Aug 2023 01:24:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:CC :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=sPLob21yTXmHaiYR1lhE/hKK0k7eQsVXJeCgznGBS1I=; b=BtoM1ZgDo65+C/ C8ZkiPNDn6YVhGP3P+mSIbanjcefff1GgdOsz+D9ic0jDQIVT9qRcpk7GsuA2KXBS4WXCBBAiws7T DE9FRPm1Iwuk8bn/QqvdA1kVbVbj8WCRxFfWYC1dlFQExmnryI5B0F9OzmsCOSxc6xaOKuEWR73MY oGKZJjowUhO5kykicN4BcVDBFnqGTUr3OeO8puR1pl1x7tXbI3C1IHVhCOo/hfLr8D6h90DC/6Zpq Zz2hpqtI6cUCjRUdQwDRjO0tJStOhCVePvQ8CFnysrHqwKVf7rNljX03sHxc08V/J0jhfRfSsUhXs 17vPNJ3i+pEfE5oMJHOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qRN4c-006MDb-2X; Thu, 03 Aug 2023 01:24:18 +0000 Received: from szxga01-in.huawei.com ([45.249.212.187]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qRN4Z-006MCl-0s; Thu, 03 Aug 2023 01:24:17 +0000 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230802_182415_482594_03B33D1B X-CRM114-Status: GOOD ( 10.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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; }