linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()
@ 2013-12-20  2:51 Wei Yongjun
  2013-12-23  8:11 ` Vijaya Mohan Guvva
  0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2013-12-20  2:51 UTC (permalink / raw)
  To: agurumur, vmohan, JBottomley; +Cc: yongjun_wei, linux-scsi

From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>

Add the missing unlock before return from function bfad_iocmd_cfg_trunk()
in the error handling case.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
 drivers/scsi/bfa/bfad_bsg.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c
index 157f604..8994fb8 100644
--- a/drivers/scsi/bfa/bfad_bsg.c
+++ b/drivers/scsi/bfa/bfad_bsg.c
@@ -2304,8 +2304,10 @@ bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
 
 	spin_lock_irqsave(&bfad->bfad_lock, flags);
 
-	if (bfa_fcport_is_dport(&bfad->bfa))
+	if (bfa_fcport_is_dport(&bfad->bfa)) {
+		spin_unlock_irqrestore(&bfad->bfad_lock, flags);
 		return BFA_STATUS_DPORT_ERR;
+	}
 
 	if ((fcport->cfg.topology == BFA_PORT_TOPOLOGY_LOOP) ||
 		(fcport->topology == BFA_PORT_TOPOLOGY_LOOP))


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* RE: [PATCH] [SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()
  2013-12-20  2:51 [PATCH] [SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk() Wei Yongjun
@ 2013-12-23  8:11 ` Vijaya Mohan Guvva
  0 siblings, 0 replies; 2+ messages in thread
From: Vijaya Mohan Guvva @ 2013-12-23  8:11 UTC (permalink / raw)
  To: Wei Yongjun, Anil Gurumurthy, JBottomley@parallels.com
  Cc: yongjun_wei@trendmicro.com.cn, linux-scsi@vger.kernel.org

> -----Original Message-----
> From: Wei Yongjun [mailto:weiyj.lk@gmail.com]
> Sent: Friday, December 20, 2013 8:21 AM
> To: Anil Gurumurthy; Vijaya Mohan Guvva; JBottomley@parallels.com
> Cc: yongjun_wei@trendmicro.com.cn; linux-scsi@vger.kernel.org
> Subject: [PATCH] [SCSI] bfa: fix missing unlock on error in
> bfad_iocmd_cfg_trunk()
> 
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> 
> Add the missing unlock before return from function bfad_iocmd_cfg_trunk()
> in the error handling case.
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
> ---
>  drivers/scsi/bfa/bfad_bsg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Looks fine, thanks, Vijay
Acked-by: Vijaya Mohan Guvva <vmohan@brocade.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-12-23  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-20  2:51 [PATCH] [SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk() Wei Yongjun
2013-12-23  8:11 ` Vijaya Mohan Guvva

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