net: dsa: mv88e6xxx: missing unlock on error path

We added a new error path, but we need to drop the lock before we return.

Fixes: 2d2e1dd299 ("net: dsa: mv88e6xxx: Cache the port cmode")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Dan Carpenter 2018-08-14 12:09:05 +03:00 committed by David S. Miller
parent f6f7a26abd
commit e29129fcac
1 changed files with 1 additions and 1 deletions

View File

@ -2408,7 +2408,7 @@ static int mv88e6xxx_setup(struct dsa_switch *ds)
if (chip->info->ops->port_get_cmode) {
err = chip->info->ops->port_get_cmode(chip, i, &cmode);
if (err)
return err;
goto unlock;
chip->ports[i].cmode = cmode;
}