lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20200519111650.17008-1-tangbin@cmss.chinamobile.com>
Date:   Tue, 19 May 2020 19:16:50 +0800
From:   Tang Bin <tangbin@...s.chinamobile.com>
To:     davem@...emloft.net
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        Tang Bin <tangbin@...s.chinamobile.com>,
        Zhang Shengju <zhangshengju@...s.chinamobile.com>
Subject: [PATCH] net/amd: Fix unused assignment in au1000_probe()

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 <zhangshengju@...s.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
---
 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)
-- 
2.20.1.windows.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ