From: Dan Carpenter <dan.carpenter@oracle.com>
To: Chris Snook <chris.snook@gmail.com>,
Johannes Berg <johannes@sipsolutions.net>
Cc: Zekun Shen <bruceshenzk@gmail.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH 1/2 net-next] alx: fix a double unlock in alx_probe()
Date: Mon, 17 May 2021 11:57:56 +0300 [thread overview]
Message-ID: <YKIwFAmmm2W2XocO@mwanda> (raw)
We're not holding the lock at this point so "goto unlock;" should be
"goto unmap;"
Fixes: 4a5fe57e7751 ("alx: use fine-grained locking instead of RTNL")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/net/ethernet/atheros/alx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/atheros/alx/main.c b/drivers/net/ethernet/atheros/alx/main.c
index e8884879a50f..45e380f3b065 100644
--- a/drivers/net/ethernet/atheros/alx/main.c
+++ b/drivers/net/ethernet/atheros/alx/main.c
@@ -1859,7 +1859,7 @@ static int alx_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
err = register_netdev(netdev);
if (err) {
dev_err(&pdev->dev, "register netdevice failed\n");
- goto out_unlock;
+ goto out_unmap;
}
netdev_info(netdev,
--
2.30.2
next reply other threads:[~2021-05-17 8:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-17 8:57 Dan Carpenter [this message]
2021-05-17 8:58 ` [PATCH 2/2 net-next] alx: unlock on error in alx_set_pauseparam() Dan Carpenter
2021-05-17 9:12 ` Johannes Berg
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=YKIwFAmmm2W2XocO@mwanda \
--to=dan.carpenter@oracle.com \
--cc=bruceshenzk@gmail.com \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=johannes@sipsolutions.net \
--cc=kernel-janitors@vger.kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
/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).