netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Andrew Lunn <andrew@lunn.ch>, Tobias Waldekranz <tobias@waldekranz.com>
Cc: Vivien Didelot <vivien.didelot@gmail.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>,
	netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
	Russell King <rmk+kernel@armlinux.org.uk>
Subject: [PATCH 2/2 net-next] net: dsa: mv88e6xxx: Unlock on error in mv88e6xxx_port_bridge_join()
Date: Mon, 7 Feb 2022 11:24:39 +0300	[thread overview]
Message-ID: <20220207082439.GB28514@kili> (raw)
In-Reply-To: <20220207082253.GA28514@kili>

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 --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)
-- 
2.20.1


  reply	other threads:[~2022-02-07  8:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-07  8:22 [PATCH 1/2 net-next] net: dsa: mv88e6xxx: Fix off by in one in mv88e6185_phylink_get_caps() Dan Carpenter
2022-02-07  8:24 ` Dan Carpenter [this message]
2022-02-07 10:10 ` Russell King (Oracle)
2022-02-07 12:40 ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220207082439.GB28514@kili \
    --to=dan.carpenter@oracle.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=tobias@waldekranz.com \
    --cc=vivien.didelot@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).