* [PATCH net] qed: Unlock on error in qed_vf_pf_acquire()
@ 2017-04-28 12:56 Dan Carpenter
2017-04-30 7:54 ` Mintz, Yuval
2017-05-01 2:42 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2017-04-28 12:56 UTC (permalink / raw)
To: Yuval Mintz; +Cc: Ariel Elior, everest-linux-l2, netdev, kernel-janitors
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));
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: [PATCH net] qed: Unlock on error in qed_vf_pf_acquire()
2017-04-28 12:56 [PATCH net] qed: Unlock on error in qed_vf_pf_acquire() Dan Carpenter
@ 2017-04-30 7:54 ` Mintz, Yuval
2017-05-01 2:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Mintz, Yuval @ 2017-04-30 7:54 UTC (permalink / raw)
To: Dan Carpenter
Cc: Elior, Ariel, netdev@vger.kernel.org,
kernel-janitors@vger.kernel.org
> 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.
Yes it seems like the right one. Thanks!
Acked-by: Yuval Mintz <Yuval.Mintz@cavium.com>
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH net] qed: Unlock on error in qed_vf_pf_acquire()
2017-04-28 12:56 [PATCH net] qed: Unlock on error in qed_vf_pf_acquire() Dan Carpenter
2017-04-30 7:54 ` Mintz, Yuval
@ 2017-05-01 2:42 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-05-01 2:42 UTC (permalink / raw)
To: dan.carpenter
Cc: Yuval.Mintz, Ariel.Elior, everest-linux-l2, netdev,
kernel-janitors
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Fri, 28 Apr 2017 15:56:09 +0300
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-05-01 2:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-28 12:56 [PATCH net] qed: Unlock on error in qed_vf_pf_acquire() Dan Carpenter
2017-04-30 7:54 ` Mintz, Yuval
2017-05-01 2:42 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox