From: Wei Yongjun Date: Fri, 20 Dec 2013 02:51:23 +0000 (+0800) Subject: [SCSI] bfa: fix missing unlock on error in bfad_iocmd_cfg_trunk() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e39a8b4f9ec67e4152032ff31eeccf4d7251833f;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [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 Acked-by: Vijaya Mohan Guvva Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/bfa/bfad_bsg.c b/drivers/scsi/bfa/bfad_bsg.c index 157f6044a9bb..8994fb857ee9 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))