aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2016-04-25 23:11:22 +0100
committerDavid S. Miller <davem@davemloft.net>2016-04-28 16:29:20 -0400
commit1d9619d5337df6cf56eb66b6c8213d1317583513 (patch)
tree192ca5415164c14b3833864f9a2e139f1aeb31f6 /drivers/net/dsa
parentnet: fix net_gso_ok for new GSO types. (diff)
downloadlinux-dev-1d9619d5337df6cf56eb66b6c8213d1317583513.tar.xz
linux-dev-1d9619d5337df6cf56eb66b6c8213d1317583513.zip
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>
Diffstat (limited to 'drivers/net/dsa')
-rw-r--r--drivers/net/dsa/mv88e6xxx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/dsa/mv88e6xxx.c b/drivers/net/dsa/mv88e6xxx.c
index a2904029cccc..5e572b3510b9 100644
--- a/drivers/net/dsa/mv88e6xxx.c
+++ b/drivers/net/dsa/mv88e6xxx.c
@@ -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);