Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1939491rwr; Sat, 6 May 2023 01:37:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4b0F6vc77D2ifFFAAotY/FedsqHcQZUIwBhMqgL6WGPScMzIeRQdOi4WH2OKI7VFVECEu+ X-Received: by 2002:a05:6a20:8f22:b0:ff:c184:7c6b with SMTP id b34-20020a056a208f2200b000ffc1847c6bmr142658pzk.10.1683362233821; Sat, 06 May 2023 01:37:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683362233; cv=none; d=google.com; s=arc-20160816; b=sUrIOGy1XS7pBglrVOmvRDLacdna/WsMw/Doh43oFeOYLXHjqZ5ZmBK9yeshw0EEbS wILWCWfmnDE4AvF/o3sjCgC7ysf6sOk5JMhXkIPzfDmoMdLoPTPwWdRJfdqTSlswrDRb KrxgyQgN9in+JeK0yE2L11QB2/XGeKqsWG+o6kLpH5UW0Ss/AysmSfWb46P1X1l62QeT wp0r37/UPayO8dy6Nn9KCvMhaJ5ZD5PD2kYEVDGGgWkkCC1myaLfqGv1LI6tPJxs80EI B2iLHKvGHbf4Z1hXmJKDquzOHnUK/CF9I3jhT9cu2Zpb5cxG5gONGAEBTwg6n7XIry8v 5muw== 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=zAmSECFU7l8XmMoH1bP7R0mp3Zjd1rNTXHcqg9jlc/c=; b=y62mSTcrkq8Xl/MesyZdnMQjwRAtclKxFi7dVveKuaZr0DMI+0Rf7cVyqI6qxK+ToX +xZ0NObWIDpfvoI2iJS7QbxWkFG0zWAnq/bnt6IOXZJGU8nrXkhPPPr4Asq5ED1bBQHM BPM6NLNumjcAZHR8Tz0qqSteYBrWGpC8OTEiCqYVfIbzveYljANJV6vqIpTUIc9moZcs 5gg0DHf8CDL0RG3F0KBhZFpXKdBQdcRHKApQvKCzFcQBK2ZpwN9DgEdfq4p9D6kFZON2 C38F9ENrYLHocm3KxGEjcHzG7YlVeNvEs465gM4db0taRSJ+1VX+nvuCcwW5hv1F3Vok f3eQ== 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 l19-20020a639853000000b00502d6decabesi3588398pgo.218.2023.05.06.01.36.59; Sat, 06 May 2023 01:37:13 -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 S230461AbjEFIHf (ORCPT + 99 others); Sat, 6 May 2023 04:07:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55276 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229527AbjEFIHe (ORCPT ); Sat, 6 May 2023 04:07:34 -0400 Received: from out30-111.freemail.mail.aliyun.com (out30-111.freemail.mail.aliyun.com [115.124.30.111]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C9047D84; Sat, 6 May 2023 01:07:32 -0700 (PDT) X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R101e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018046056;MF=jiapeng.chong@linux.alibaba.com;NM=1;PH=DS;RN=12;SR=0;TI=SMTPD_---0VhsmiiL_1683360447; Received: from localhost(mailfrom:jiapeng.chong@linux.alibaba.com fp:SMTPD_---0VhsmiiL_1683360447) by smtp.aliyun-inc.com; Sat, 06 May 2023 16:07:29 +0800 From: Jiapeng Chong To: dario.binacchi@amarulasolutions.com Cc: wg@grandegger.com, mkl@pengutronix.de, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, linux-can@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Jiapeng Chong , Abaci Robot Subject: [PATCH] can: bxcan: Remove unnecessary print function dev_err() Date: Sat, 6 May 2023 16:07:25 +0800 Message-Id: <20230506080725.68401-1-jiapeng.chong@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, URIBL_BLOCKED,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_byname() already prints an error. ./drivers/net/can/bxcan.c:970:2-9: line 970 is redundant because platform_get_irq() already prints an error. ./drivers/net/can/bxcan.c:964:2-9: line 964 is redundant because platform_get_irq() already prints an error. ./drivers/net/can/bxcan.c:958:2-9: line 958 is redundant because platform_get_irq() already prints an error. Reported-by: Abaci Robot Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=4878 Signed-off-by: Jiapeng Chong --- drivers/net/can/bxcan.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/drivers/net/can/bxcan.c b/drivers/net/can/bxcan.c index e26ccd41e3cb..7b285eeb08a1 100644 --- a/drivers/net/can/bxcan.c +++ b/drivers/net/can/bxcan.c @@ -954,22 +954,16 @@ static int bxcan_probe(struct platform_device *pdev) } rx_irq = platform_get_irq_byname(pdev, "rx0"); - if (rx_irq < 0) { - dev_err(dev, "failed to get rx0 irq\n"); + if (rx_irq < 0) return rx_irq; - } tx_irq = platform_get_irq_byname(pdev, "tx"); - if (tx_irq < 0) { - dev_err(dev, "failed to get tx irq\n"); + if (tx_irq < 0) return tx_irq; - } sce_irq = platform_get_irq_byname(pdev, "sce"); - if (sce_irq < 0) { - dev_err(dev, "failed to get sce irq\n"); + if (sce_irq < 0) return sce_irq; - } ndev = alloc_candev(sizeof(struct bxcan_priv), BXCAN_TX_MB_NUM); if (!ndev) { -- 2.20.1.7.g153144c