From patchwork Fri Apr 3 01:57:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 11471753 X-Patchwork-Delegate: herbert@gondor.apana.org.au Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 407E815AB for ; Fri, 3 Apr 2020 01:56:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 27F66206F6 for ; Fri, 3 Apr 2020 01:56:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390269AbgDCBz7 (ORCPT ); Thu, 2 Apr 2020 21:55:59 -0400 Received: from cmccmta3.chinamobile.com ([221.176.66.81]:4026 "EHLO cmccmta3.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390268AbgDCBz7 (ORCPT ); Thu, 2 Apr 2020 21:55:59 -0400 X-Greylist: delayed 37571 seconds by postgrey-1.27 at vger.kernel.org; Thu, 02 Apr 2020 21:55:57 EDT Received: from spf.mail.chinamobile.com (unknown[172.16.121.15]) by rmmx-syy-dmz-app09-12009 (RichMail) with SMTP id 2ee95e86979e067-67007; Fri, 03 Apr 2020 09:55:43 +0800 (CST) X-RM-TRANSID: 2ee95e86979e067-67007 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr08-12008 (RichMail) with SMTP id 2ee85e86979cea6-12f6b; Fri, 03 Apr 2020 09:55:42 +0800 (CST) X-RM-TRANSID: 2ee85e86979cea6-12f6b From: Tang Bin To: clabbe@baylibre.com, herbert@gondor.apana.org.au, davem@davemloft.net, narmstrong@baylibre.com Cc: linux-crypto@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org, Tang Bin Subject: [PATCH] crypto:amlogic - Delete duplicate dev_err in meson_crypto_probe() Date: Fri, 3 Apr 2020 09:57:10 +0800 Message-Id: <20200403015710.2764-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Sender: linux-crypto-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org In this place, when something goes wrong, platform_get_irq() will print an error message, so in order to avoid the situation of repeat output,we should remove dev_err here. Signed-off-by: Tang Bin --- drivers/crypto/amlogic/amlogic-gxl-core.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/crypto/amlogic/amlogic-gxl-core.c b/drivers/crypto/amlogic/amlogic-gxl-core.c index 9d4ead2f7..411857fad 100644 --- a/drivers/crypto/amlogic/amlogic-gxl-core.c +++ b/drivers/crypto/amlogic/amlogic-gxl-core.c @@ -253,10 +253,8 @@ static int meson_crypto_probe(struct platform_device *pdev) mc->irqs = devm_kcalloc(mc->dev, MAXFLOW, sizeof(int), GFP_KERNEL); for (i = 0; i < MAXFLOW; i++) { mc->irqs[i] = platform_get_irq(pdev, i); - if (mc->irqs[i] < 0) { - dev_err(mc->dev, "Cannot get IRQ for flow %d\n", i); + if (mc->irqs[i] < 0) return mc->irqs[i]; - } err = devm_request_irq(&pdev->dev, mc->irqs[i], meson_irq_handler, 0, "gxl-crypto", mc);