diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2021-06-03 23:28:03 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-18 21:59:58 -0400 |
commit | f9dc034d0402be35288959bfb44a41363be2b13e (patch) | |
tree | f2b5d135236b264df1d9321e020d4071dd017833 /drivers | |
parent | ebc076b3eddc807729bd81f7bc48e798a3ddc477 (diff) |
scsi: mpi3mr: Fix missing unlock on error
Goto unlock path before return from function in the error handling case.
Link: https://lore.kernel.org/r/20210603152803.717505-1-yangyingliang@huawei.com
Fixes: c9566231cfaf ("scsi: mpi3mr: Create operational request and reply queue pair")
Reported-by: Hulk Robot <hulkci@huawei.com>
Acked-by: Kashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr_fw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c index 88db2f0e13fd..20452576d7d6 100644 --- a/drivers/scsi/mpi3mr/mpi3mr_fw.c +++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c @@ -1585,7 +1585,7 @@ static int mpi3mr_create_op_reply_q(struct mpi3mr_ioc *mrioc, u16 qidx) if (mrioc->init_cmds.state & MPI3MR_CMD_PENDING) { retval = -1; ioc_err(mrioc, "CreateRepQ: Init command is in use\n"); - goto out; + goto out_unlock; } mrioc->init_cmds.state = MPI3MR_CMD_PENDING; mrioc->init_cmds.is_waiting = 1; @@ -1694,7 +1694,7 @@ static int mpi3mr_create_op_req_q(struct mpi3mr_ioc *mrioc, u16 idx, if (mrioc->init_cmds.state & MPI3MR_CMD_PENDING) { retval = -1; ioc_err(mrioc, "CreateReqQ: Init command is in use\n"); - goto out; + goto out_unlock; } mrioc->init_cmds.state = MPI3MR_CMD_PENDING; mrioc->init_cmds.is_waiting = 1; |