summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2018-08-14 12:09:05 +0300
committerDavid S. Miller <davem@davemloft.net>2018-08-14 20:08:07 +0300
commite29129fcac4b7fe9e5d087e2590b9e2e7125e84c (patch)
tree444706ce20f999853c45c69908c647015914a0c6 /drivers/net
parentf6f7a26abd14cfa0f3f3009a2d274d36798668bb (diff)
downloadlinux-e29129fcac4b7fe9e5d087e2590b9e2e7125e84c.tar.xz
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 <dan.carpenter@oracle.com> Signed-off-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/dsa/mv88e6xxx/chip.c2
1 files changed, 1 insertions, 1 deletions
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;
}