diff options
| author | Florian Fainelli <[email protected]> | 2017-04-05 18:19:30 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2017-04-06 20:33:17 +0000 |
| commit | 5865ccce7eac9bb520d7dacfb48cb72764ed10c3 (patch) | |
| tree | 12ff128c9c1ea1b7741382b9f1595396ff897abc /drivers/net/dsa/dsa_loop.c | |
| parent | net/sched: Removed unused vlan actions definition (diff) | |
| download | kernel-5865ccce7eac9bb520d7dacfb48cb72764ed10c3.tar.gz kernel-5865ccce7eac9bb520d7dacfb48cb72764ed10c3.zip | |
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: Dan Carpenter <[email protected]>
Fixes: 98cd1552ea27 ("net: dsa: Mock-up driver")
Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/dsa/dsa_loop.c')
| -rw-r--r-- | drivers/net/dsa/dsa_loop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/dsa_loop.c b/drivers/net/dsa/dsa_loop.c index bc5acc15edbf..ee55a902fa66 100644 --- a/drivers/net/dsa/dsa_loop.c +++ b/drivers/net/dsa/dsa_loop.c @@ -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__); |
