diff mbox series

net/amd: Fix unused assignment in au1000_probe()

Message ID 20200519111650.17008-1-tangbin@cmss.chinamobile.com
State New
Headers show
Series net/amd: Fix unused assignment in au1000_probe() | expand

Commit Message

Tang Bin May 19, 2020, 11:16 a.m. UTC
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@cmss.chinamobile.com>
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
 drivers/net/ethernet/amd/au1000_eth.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

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)