提交 0a6d58a7 编写于 作者: D Dan Carpenter 提交者: David S. Miller

net: dsa: uninitialized variable in dsa_slave_netdevice_event()

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

Fixes: acc43b7b ("net: dsa: allow masters to join a LAG")
Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 9408f3d3
...@@ -3145,7 +3145,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb, ...@@ -3145,7 +3145,7 @@ static int dsa_slave_netdevice_event(struct notifier_block *nb,
case NETDEV_CHANGELOWERSTATE: { case NETDEV_CHANGELOWERSTATE: {
struct netdev_notifier_changelowerstate_info *info = ptr; struct netdev_notifier_changelowerstate_info *info = ptr;
struct dsa_port *dp; struct dsa_port *dp;
int err; int err = 0;
if (dsa_slave_dev_check(dev)) { if (dsa_slave_dev_check(dev)) {
dp = dsa_slave_to_port(dev); dp = dsa_slave_to_port(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册