diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2022-10-14 18:08:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2022-10-15 13:15:27 +0300 |
commit | 0a6d58a70a39d9a74882af6d00ec6df0737503ff (patch) | |
tree | ffa960b263d3c2c67842ac087094cb5b6e0101f5 /net/dsa | |
parent | 9408f3d321ed2286b9722bceff08ca28b741c026 (diff) | |
download | linux-0a6d58a70a39d9a74882af6d00ec6df0737503ff.tar.xz |
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")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/slave.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 1a59918d3b30..a9fde48cffd4 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -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); |