diff mbox series

[2/2,net-next] net: dsa: mv88e6xxx: Unlock on error in mv88e6xxx_port_bridge_join()

Message ID 20220207082439.GB28514@kili (mailing list archive)
State Accepted
Commit ff62433883b3ab753a78954ecf46e2c514f5c407
Delegated to: Netdev Maintainers
Headers show
Series [1/2,net-next] net: dsa: mv88e6xxx: Fix off by in one in mv88e6185_phylink_get_caps() | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers success CCed 8 of 8 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/verify_fixes success Fixes tag looks correct
netdev/build_allmodconfig_warn success Errors and warnings before: 0 this patch: 0
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Dan Carpenter Feb. 7, 2022, 8:24 a.m. UTC
Call mv88e6xxx_reg_unlock(chip) before returning on this error path.

Fixes: 7af4a361a62f ("net: dsa: mv88e6xxx: Improve isolation of standalone ports")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
 drivers/net/dsa/mv88e6xxx/chip.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index 192a7688b4df..c54649c4c3a0 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -2602,7 +2602,7 @@  static int mv88e6xxx_port_bridge_join(struct dsa_switch *ds, int port,
 
 	err = mv88e6xxx_port_set_map_da(chip, port, true);
 	if (err)
-		return err;
+		goto unlock;
 
 	err = mv88e6xxx_port_commit_pvid(chip, port);
 	if (err)