All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] net/amd: Fix unused assignment in au1000_probe()
@ 2020-05-19 11:16 Tang Bin
  0 siblings, 0 replies; only message in thread
From: Tang Bin @ 2020-05-19 11:16 UTC (permalink / raw)
  To: davem; +Cc: netdev, linux-kernel, Tang Bin, Zhang Shengju

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 --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




^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-05-19 11:16 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-19 11:16 [PATCH] net/amd: Fix unused assignment in au1000_probe() Tang Bin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.