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

Commit 1d9619d5 authored by Colin Ian King's avatar Colin Ian King Committed by David S. Miller
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 7b748340
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2181,7 +2181,7 @@ int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port,
			       struct net_device *bridge)
{
	struct mv88e6xxx_priv_state *ps = ds_to_priv(ds);
	int i, err;
	int i, err = 0;

	mutex_lock(&ps->smi_mutex);