[PATCH] net/amd: Fix unused assignment in au1000_probe()

From: Tang Bin
Date: Tue May 19 2020 - 07:16:13 EST


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@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Tang Bin <tangbin@xxxxxxxxxxxxxxxxxxxx>
---
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