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>
This commit is contained in:
parent
7b7483409f
commit
1d9619d533
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue