From: Coiby Xu <coiby.xu@gmail.com>
To: devel@driverdev.osuosl.org
Cc: joe@perches.com, dan.carpenter@oracle.com,
Manish Chopra <manishc@marvell.com>,
GR-Linux-NIC-Dev@marvell.com (supporter:QLOGIC QLGE 10Gb
ETHERNET DRIVER), Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
netdev@vger.kernel.org (open list:QLOGIC QLGE 10Gb ETHERNET
DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH 3/4] fix ql_sem_unlock
Date: Sat, 27 Jun 2020 18:14:46 +0800 [thread overview]
Message-ID: <20200627101447.167370-4-coiby.xu@gmail.com> (raw)
In-Reply-To: <20200627101447.167370-1-coiby.xu@gmail.com>
Some functions return without releasing the lock. Replace return with
break.
Suggested-by Dan Carpenter <dan.carpenter@oracle.com>.
Signed-off-by: Coiby Xu <coiby.xu@gmail.com>
---
drivers/staging/qlge/qlge_dbg.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/qlge/qlge_dbg.c b/drivers/staging/qlge/qlge_dbg.c
index 87433510a224..63e965966ced 100644
--- a/drivers/staging/qlge/qlge_dbg.c
+++ b/drivers/staging/qlge/qlge_dbg.c
@@ -1390,7 +1390,7 @@ static void ql_dump_cam_entries(struct ql_adapter *qdev)
if (ql_get_mac_addr_reg(qdev, MAC_ADDR_TYPE_CAM_MAC, i, value)) {
pr_err("%s: Failed read of mac index register\n",
__func__);
- return;
+ break;
}
if (value[0])
pr_err("%s: CAM index %d CAM Lookup Lower = 0x%.08x:%.08x, Output = 0x%.08x\n",
@@ -1402,7 +1402,7 @@ static void ql_dump_cam_entries(struct ql_adapter *qdev)
(qdev, MAC_ADDR_TYPE_MULTI_MAC, i, value)) {
pr_err("%s: Failed read of mac index register\n",
__func__);
- return;
+ break;
}
if (value[0])
pr_err("%s: MCAST index %d CAM Lookup Lower = 0x%.08x:%.08x\n",
@@ -1424,7 +1424,7 @@ void ql_dump_routing_entries(struct ql_adapter *qdev)
if (ql_get_routing_reg(qdev, i, &value)) {
pr_err("%s: Failed read of routing index register\n",
__func__);
- return;
+ break;
}
if (value)
pr_err("%s: Routing Mask %d = 0x%.08x\n",
--
2.27.0
next prev parent reply other threads:[~2020-06-27 10:15 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20200627101447.167370-1-coiby.xu@gmail.com>
2020-06-27 10:14 ` [PATCH 1/4] fix trailing */ in block comment Coiby Xu
2020-06-27 10:47 ` Greg Kroah-Hartman
2020-06-27 15:01 ` Coiby Xu
2020-06-27 10:14 ` [PATCH 2/4] fix else after return or break Coiby Xu
2020-06-27 10:14 ` Coiby Xu [this message]
2020-06-27 10:14 ` [PATCH 4/4] replace pr_err with netdev_err Coiby Xu
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=20200627101447.167370-4-coiby.xu@gmail.com \
--to=coiby.xu@gmail.com \
--cc=GR-Linux-NIC-Dev@marvell.com \
--cc=dan.carpenter@oracle.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=manishc@marvell.com \
--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
all inboxes | Powered by JetHome®