From: Dan Carpenter <dan.carpenter@oracle.com>
To: Yuval Mintz <Yuval.Mintz@cavium.com>
Cc: Ariel Elior <Ariel.Elior@cavium.com>,
everest-linux-l2@cavium.com, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: [PATCH net] qed: Unlock on error in qed_vf_pf_acquire()
Date: Fri, 28 Apr 2017 15:56:09 +0300 [thread overview]
Message-ID: <20170428125608.djln5r7h4d53it5s@mwanda> (raw)
My static checker complains that we're holding a mutex on this error
path. Let's goto exit instead of returning directly.
Fixes: b0bccb69eba3 ("qed: Change locking scheme for VF channel")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
Yuval, could you review this one a bit carefully and also check that my
Fixes tag is correct because I'm not certain.
diff --git a/drivers/net/ethernet/qlogic/qed/qed_vf.c b/drivers/net/ethernet/qlogic/qed/qed_vf.c
index c4c4a408b40b..11d71e5eea14 100644
--- a/drivers/net/ethernet/qlogic/qed/qed_vf.c
+++ b/drivers/net/ethernet/qlogic/qed/qed_vf.c
@@ -234,7 +234,7 @@ static int qed_vf_pf_acquire(struct qed_hwfn *p_hwfn)
/* send acquire request */
rc = qed_send_msg2pf(p_hwfn, &resp->hdr.status, sizeof(*resp));
if (rc)
- return rc;
+ goto exit;
/* copy acquire response from buffer to p_hwfn */
memcpy(&p_iov->acquire_resp, resp, sizeof(p_iov->acquire_resp));
next reply other threads:[~2017-04-28 12:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-28 12:56 Dan Carpenter [this message]
2017-04-30 7:54 ` [PATCH net] qed: Unlock on error in qed_vf_pf_acquire() Mintz, Yuval
2017-05-01 2:42 ` David Miller
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=20170428125608.djln5r7h4d53it5s@mwanda \
--to=dan.carpenter@oracle.com \
--cc=Ariel.Elior@cavium.com \
--cc=Yuval.Mintz@cavium.com \
--cc=everest-linux-l2@cavium.com \
--cc=kernel-janitors@vger.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