Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5865ccce authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller
Browse files

net: dsa: loop: Fix uninitialized pvid variable



Dan's static analyzer reported the following:

	drivers/net/dsa/dsa_loop.c:181 dsa_loop_port_vlan_del()
	error: XXX uninitialized symbol 'pvid'.

we were missing the assignment of pvid to ps->vid, so add that.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 98cd1552 ("net: dsa: Mock-up driver")
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 91e91bef
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -164,7 +164,7 @@ static int dsa_loop_port_vlan_del(struct dsa_switch *ds, int port,
	struct dsa_loop_priv *ps = ds->priv;
	struct mii_bus *bus = ps->bus;
	struct dsa_loop_vlan *vl;
	u16 vid, pvid;
	u16 vid, pvid = ps->pvid;

	dev_dbg(ds->dev, "%s\n", __func__);