Skip to content

Commit

Permalink
net: dsa: uninitialized variable in dsa_slave_netdevice_event()
Browse files Browse the repository at this point in the history
Return zero if both dsa_slave_dev_check() and netdev_uses_dsa() are false.

Fixes: acc43b7 ("net: dsa: allow masters to join a LAG")
Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Dan Carpenter authored and davem330 committed Oct 15, 2022
1 parent 9408f3d commit 0a6d58a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/slave.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 0a6d58a

Please sign in to comment.