Skip to content

Commit e39a8b4

Browse files
Wei YongjunJames Bottomley
authored andcommitted
[SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()
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> Acked-by: Vijaya Mohan Guvva <vmohan@brocade.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
1 parent ad469a5 commit e39a8b4

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎drivers/scsi/bfa/bfad_bsg.c‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2304,8 +2304,10 @@ bfad_iocmd_cfg_trunk(struct bfad_s *bfad, void *cmd, unsigned int v_cmd)
23042304

23052305
spin_lock_irqsave(&bfad->bfad_lock, flags);
23062306

2307-
if (bfa_fcport_is_dport(&bfad->bfa))
2307+
if (bfa_fcport_is_dport(&bfad->bfa)) {
2308+
spin_unlock_irqrestore(&bfad->bfad_lock, flags);
23082309
return BFA_STATUS_DPORT_ERR;
2310+
}
23092311

23102312
if ((fcport->cfg.topology == BFA_PORT_TOPOLOGY_LOOP) ||
23112313
(fcport->topology == BFA_PORT_TOPOLOGY_LOOP))

0 commit comments

Comments
 (0)