From mboxrd@z Thu Jan 1 00:00:00 1970 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 DCA64C0015E for ; Fri, 4 Aug 2023 01:15:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbjHDBPG (ORCPT ); Thu, 3 Aug 2023 21:15:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47202 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230367AbjHDBPD (ORCPT ); Thu, 3 Aug 2023 21:15:03 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12A504206 for ; Thu, 3 Aug 2023 18:15:02 -0700 (PDT) Received: from kwepemi500008.china.huawei.com (unknown [172.30.72.56]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4RH73g6v1PzJrGZ; Fri, 4 Aug 2023 09:12:15 +0800 (CST) Received: from [10.67.109.254] (10.67.109.254) by kwepemi500008.china.huawei.com (7.221.188.139) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 4 Aug 2023 09:14:59 +0800 Message-ID: Date: Fri, 4 Aug 2023 09:14:59 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.2.0 Subject: Re: [PATCH v2 -next] misc: hi6421-spmi-pmic: Remove redundant dev_err() Content-Language: en-US To: , , References: <20230726180707.2486808-1-ruanjinjie@huawei.com> From: Ruan Jinjie In-Reply-To: <20230726180707.2486808-1-ruanjinjie@huawei.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.109.254] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500008.china.huawei.com (7.221.188.139) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ping. On 2023/7/27 2:07, Ruan Jinjie wrote: > There is no need to call the dev_err() function directly to print a custom > message when handling an error from the platform_get_irq() function as it > is going to display an appropriate error message in case of a failure. > > Signed-off-by: Ruan Jinjie > --- > v2: > - fix the coding style errors > --- > drivers/misc/hi6421v600-irq.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) > > diff --git a/drivers/misc/hi6421v600-irq.c b/drivers/misc/hi6421v600-irq.c > index caa3de37698b..b075d803a2c2 100644 > --- a/drivers/misc/hi6421v600-irq.c > +++ b/drivers/misc/hi6421v600-irq.c > @@ -244,10 +244,8 @@ static int hi6421v600_irq_probe(struct platform_device *pdev) > pmic_pdev = container_of(pmic_dev, struct platform_device, dev); > > priv->irq = platform_get_irq(pmic_pdev, 0); > - if (priv->irq < 0) { > - dev_err(dev, "Error %d when getting IRQs\n", priv->irq); > + if (priv->irq < 0) > return priv->irq; > - } > > platform_set_drvdata(pdev, priv); >