From patchwork Tue May 19 11:16:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tang Bin X-Patchwork-Id: 219017 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D848CC433E1 for ; Tue, 19 May 2020 11:16:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BC6C920708 for ; Tue, 19 May 2020 11:16:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728759AbgESLQL (ORCPT ); Tue, 19 May 2020 07:16:11 -0400 Received: from cmccmta2.chinamobile.com ([221.176.66.80]:50476 "EHLO cmccmta2.chinamobile.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726505AbgESLQL (ORCPT ); Tue, 19 May 2020 07:16:11 -0400 Received: from spf.mail.chinamobile.com (unknown[172.16.121.5]) by rmmx-syy-dmz-app06-12006 (RichMail) with SMTP id 2ee65ec3bff496d-50d87; Tue, 19 May 2020 19:16:05 +0800 (CST) X-RM-TRANSID: 2ee65ec3bff496d-50d87 X-RM-TagInfo: emlType=0 X-RM-SPAM-FLAG: 00000000 Received: from localhost.localdomain (unknown[112.25.154.146]) by rmsmtp-syy-appsvr03-12003 (RichMail) with SMTP id 2ee35ec3bff229f-980e4; Tue, 19 May 2020 19:16:05 +0800 (CST) X-RM-TRANSID: 2ee35ec3bff229f-980e4 From: Tang Bin To: davem@davemloft.net Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Tang Bin , Zhang Shengju Subject: [PATCH] net/amd: Fix unused assignment in au1000_probe() Date: Tue, 19 May 2020 19:16:50 +0800 Message-Id: <20200519111650.17008-1-tangbin@cmss.chinamobile.com> X-Mailer: git-send-email 2.20.1.windows.1 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Delete unused initialized value of 'err', because it will be assigned by the function mdiobus_register(). And the variable 'err = -ENODEV' is duplicate, so remove redundant one. Signed-off-by: Zhang Shengju Signed-off-by: Tang Bin --- drivers/net/ethernet/amd/au1000_eth.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/ethernet/amd/au1000_eth.c b/drivers/net/ethernet/amd/au1000_eth.c index 5f91e717b..76ac3a752 100644 --- a/drivers/net/ethernet/amd/au1000_eth.c +++ b/drivers/net/ethernet/amd/au1000_eth.c @@ -1064,7 +1064,7 @@ static int au1000_probe(struct platform_device *pdev) struct au1000_eth_platform_data *pd; struct net_device *dev = NULL; struct db_dest *pDB, *pDBfree; - int irq, i, err = 0; + int irq, i, err; struct resource *base, *macen, *macdma; base = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -1252,7 +1252,6 @@ static int au1000_probe(struct platform_device *pdev) aup->rx_db_inuse[i] = pDB; } - err = -ENODEV; for (i = 0; i < NUM_TX_DMA; i++) { pDB = au1000_GetFreeDB(aup); if (!pDB)