From e29129fcac4b7fe9e5d087e2590b9e2e7125e84c Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Tue, 14 Aug 2018 12:09:05 +0300 Subject: [PATCH] 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 --- drivers/net/dsa/mv88e6xxx/chip.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.30.2