Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e39a8b4f authored by Wei Yongjun's avatar Wei Yongjun Committed by James Bottomley
Browse files

[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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: default avatarVijaya Mohan Guvva <vmohan@brocade.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent ad469a57
Loading
Loading
Loading
Loading
+3 −1
Original line number Original line Diff line number Diff line
@@ -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);
	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;
		return BFA_STATUS_DPORT_ERR;
	}


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