Skip to content

Commit 1d9619d

Browse files
Colin Ian Kingdavem330
authored andcommitted
net: dsa: mv88e6xxx: fix uninitialized error return
The error return err is not initialized and there is a possibility that err is not assigned causing mv88e6xxx_port_bridge_join to return a garbage error return status. Fix this by initializing err to 0. Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7b74834 commit 1d9619d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/net/dsa/mv88e6xxx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2181,7 +2181,7 @@ int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port,
21812181
struct net_device *bridge)
21822182
{
21832183
struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
2184-
int i, err;
2184+
int i, err = 0;
21852185

21862186
mutex_lock(&ps->smi_mutex);
21872187

0 commit comments

Comments
 (0)