From: Dan Carpenter Date: Tue, 14 Aug 2018 09:09:05 +0000 (+0300) Subject: net: dsa: mv88e6xxx: missing unlock on error path X-Git-Tag: v5.15~8230^2~5 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=e29129fcac4b7fe9e5d087e2590b9e2e7125e84c;p=mirror_ubuntu-kernels.git 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: 2d2e1dd29962 ("net: dsa: mv88e6xxx: Cache the port cmode") Signed-off-by: Dan Carpenter Signed-off-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c index 17752316ab10..8da3d39e3218 100644 --- a/drivers/net/dsa/mv88e6xxx/chip.c +++ b/drivers/net/dsa/mv88e6xxx/chip.c @@ -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; }