Skip to contentSkip to conversation

net: dsa: uninitialized variable in dsa_slave_netdevice_event()

PATCH Applied Dan Carpenter 2 participants 2 messages Oct 14, 2022 – Oct 15, 2022

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: uninitialized variable in dsa_slave_netdevice_event()

Return zero if both dsa_slave_dev_check() and netdev_uses_dsa() are false.

Fixes acc43b7bf52a ("net: dsa: allow masters to join a LAG")

---
(Vladimir helped me with this patch)

 net/dsa/slave.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/slave.c +1 -1
index 1a59918d3b30..a9fde48cffd4 100644
@@ -3145,7 +3145,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
 	case NETDEV_CHANGELOWERSTATE: {
 		struct netdev_notifier_changelowerstate_info *info = ptr;
 		struct dsa_port *dp;
-		int err;
+		int err = 0;
 
 		if (dsa_slave_dev_check(dev)) {
 			dp = dsa_slave_to_port(dev);
Signature · 1 line
2.35.1
#1 lore raw
This patch was applied to netdev/net.git (master) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net.git (master)
by David S. Miller <[email protected]>:

Quoted 8 lines · On Fri, 14 Oct 2022 18:08:39 +0300 you wrote:

Return zero if both dsa_slave_dev_check() and netdev_uses_dsa() are false.

Fixes acc43b7bf52a ("net: dsa: allow masters to join a LAG")

---
(Vladimir helped me with this patch)

[...]

Here is the summary with links:
- [net] net: dsa: uninitialized variable in dsa_slave_netdevice_event()

    https://git.kernel.org/netdev/net/c/0a6d58a70a39

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html