Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp891536iob; Wed, 4 May 2022 10:03:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz91Qoa8bxC6PnpjyuZRP1UXzA16ZYgbjvTTwIVkPWJ6YzcLnJa8PW8zmgwFMsnh0gs18Ck X-Received: by 2002:a05:6602:2e10:b0:65a:9ddd:e424 with SMTP id o16-20020a0566022e1000b0065a9ddde424mr2348687iow.133.1651683808164; Wed, 04 May 2022 10:03:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651683808; cv=none; d=google.com; s=arc-20160816; b=aj32nTrKW2SDoCn89++pN4wUHVP182JrRH+67VrzjhyJ5BT2/93hrwYq2dqcK4Atwx kPgJPmrkeVOjXSuNh2pNvn4f2aq0iKML1z0FHKvqW+nuDnZoRhHUYTZlxDlIbvKR6p8e KykduihlM2LKUFBS/DVceZuvauPKps3M2o+vmw/y4jfiXSowANGkbbCvwnrlPvRIQjw9 q8HNv+JxHdkx/pin/bmmAMI3dY5LPkbdCOvzP0swPEC8Zm8DhCEpm0m2wxeYqPAEBf2O HG0JXSw/zONM1gZXE5IRTjJmHH/WXLtl7b2IJRISHOKEVfPNs9tnlP62QayjKbI7ohtg spWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=jcOCIpatBxPOBySwQh9ZDUnD/oasRUxxUUOZxKKizTo=; b=jlOd45xLKf+HWRAIyaAJ2GFmAWJUFLtwO9XzQc8TzY04HfrohxmpNbJOdDWTqdRxig 7mEa6w/k+tA1qfopjcRazZqKgcu4+Tam66thtTO676tAWJgDJSjLrWlspmKJfuXu+7ek aWO7WD3fA4zHFktO2VXBB6tQlCtl+KmhTxZ2pm8pkuEgKHfLnOQasAMB1DtfI1XCarrn fUVdLqfAbku9Tt8EXKicPNSRegBpw+PAITZbcnOt3Nw7iru7AN9PiN3xJKf9CsEsXnMi JttwOQnGmmOs1CYQiZ198NNDq2mbG6qJHyBkdmKgevo8m4lu8YRYWm78F1RaH6eSFPfG /drw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a056e02216200b002cc3a025ff9si2914066ilv.10.2022.05.04.10.03.09; Wed, 04 May 2022 10:03:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1350450AbiEDNz4 (ORCPT + 99 others); Wed, 4 May 2022 09:55:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235435AbiEDNzz (ORCPT ); Wed, 4 May 2022 09:55:55 -0400 Received: from out30-56.freemail.mail.aliyun.com (out30-56.freemail.mail.aliyun.com [115.124.30.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 195F13614F; Wed, 4 May 2022 06:52:18 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R491e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e04426;MF=yang.lee@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VCCCYkP_1651672335; Received: from localhost(mailfrom:yang.lee@linux.alibaba.com fp:SMTPD_---0VCCCYkP_1651672335) by smtp.aliyun-inc.com(127.0.0.1); Wed, 04 May 2022 21:52:16 +0800 From: Yang Li To: sre@kernel.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Yang Li , Abaci Robot Subject: [PATCH -next] power: supply: Remove unnecessary print function dev_err() Date: Wed, 4 May 2022 21:52:14 +0800 Message-Id: <20220504135214.28901-1-yang.lee@linux.alibaba.com> X-Mailer: git-send-email 2.20.1.7.g153144c MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY, USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The print function dev_err() is redundant because platform_get_irq() already prints an error. Eliminate the follow coccicheck warning: ./drivers/power/supply/goldfish_battery.c:225:2-9: line 225 is redundant because platform_get_irq() already prints an error Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/power/supply/goldfish_battery.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/power/supply/goldfish_battery.c b/drivers/power/supply/goldfish_battery.c index bf1754355c9f..a58d713d75ce 100644 --- a/drivers/power/supply/goldfish_battery.c +++ b/drivers/power/supply/goldfish_battery.c @@ -221,10 +221,8 @@ static int goldfish_battery_probe(struct platform_device *pdev) } data->irq = platform_get_irq(pdev, 0); - if (data->irq < 0) { - dev_err(&pdev->dev, "platform_get_irq failed\n"); + if (data->irq < 0) return -ENODEV; - } ret = devm_request_irq(&pdev->dev, data->irq, goldfish_battery_interrupt, -- 2.20.1.7.g153144c