[PATCH] net: dsa: microchip: remove unneeded variable

Subsystems: microchip ksz series ethernet switch driver, networking drivers, networking [dsa], the rest

STALE1757d

2 messages, 2 authors, 2021-12-17 · open the first message on its own page

[PATCH] net: dsa: microchip: remove unneeded variable

From: <hidden>
Date: 2021-12-16 09:13:50

From: Changcheng Deng <redacted>

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <redacted>
Signed-off-by: Changcheng Deng <redacted>
---
 drivers/net/dsa/microchip/ksz_common.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c
index 47a856533cff..55dbda04ea62 100644
--- a/drivers/net/dsa/microchip/ksz_common.c
+++ b/drivers/net/dsa/microchip/ksz_common.c
@@ -302,7 +302,6 @@ int ksz_port_mdb_del(struct dsa_switch *ds, int port,
 	struct ksz_device *dev = ds->priv;
 	struct alu_struct alu;
 	int index;
-	int ret = 0;
 
 	for (index = 0; index < dev->num_statics; index++) {
 		if (!dev->dev_ops->r_sta_mac_table(dev, index, &alu)) {
@@ -324,7 +323,7 @@ int ksz_port_mdb_del(struct dsa_switch *ds, int port,
 	dev->dev_ops->w_sta_mac_table(dev, index, &alu);
 
 exit:
-	return ret;
+	return 0;
 }
 EXPORT_SYMBOL_GPL(ksz_port_mdb_del);
 
-- 
2.25.1

Re: [PATCH] net: dsa: microchip: remove unneeded variable

From: patchwork-bot+netdevbpf@kernel.org
Date: 2021-12-17 10:30:18

Hello:

This patch was applied to netdev/net-next.git (master)
by David S. Miller [off-list ref]:

On Thu, 16 Dec 2021 09:13:39 +0000 you wrote:
From: Changcheng Deng <redacted>

Remove unneeded variable used to store return value.

Reported-by: Zeal Robot <redacted>
Signed-off-by: Changcheng Deng <redacted>

[...]
Here is the summary with links:
  - net: dsa: microchip: remove unneeded variable
    https://git.kernel.org/netdev/net-next/c/86df8be67f6c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help