Skip to content

Commit

Permalink
[SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wei Yongjun authored and James Bottomley committed Mar 15, 2014
1 parent ad469a5 commit e39a8b4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/bfa/bfad_bsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e39a8b4

Please sign in to comment.