aboutsummaryrefslogtreecommitdiff
path: root/drivers/scsi/mpi3mr
diff options
context:
space:
mode:
authorYang Yingliang2021-06-03 23:16:53 +0800
committerMartin K. Petersen2021-06-18 22:03:04 -0400
commita254eae30b45bb5f03b66e6b1047829cd4337976 (patch)
tree58bc95470932a56975865b97f4803ce63cf318f2 /drivers/scsi/mpi3mr
parentf9dc034d0402be35288959bfb44a41363be2b13e (diff)
scsi: mpi3mr: Fix error return code in mpi3mr_init_ioc()
Fix to return a negative error code from the error handling case instead of 0 as done elsewhere in this function. Link: https://lore.kernel.org/r/20210603151653.711020-1-yangyingliang@huawei.com Fixes: fb9b04574f14 ("scsi: mpi3mr: Add support for recovering controller") Fixes: 824a156633df ("scsi: mpi3mr: Base driver code") 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/scsi/mpi3mr')
-rw-r--r--drivers/scsi/mpi3mr/mpi3mr_fw.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr_fw.c b/drivers/scsi/mpi3mr/mpi3mr_fw.c
index 20452576d7d6..00f2d0d91ee4 100644
--- a/drivers/scsi/mpi3mr/mpi3mr_fw.c
+++ b/drivers/scsi/mpi3mr/mpi3mr_fw.c
@@ -3297,6 +3297,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc, u8 re_init)
}
ioc_state = mpi3mr_get_iocstate(mrioc);
if (ioc_state != MRIOC_STATE_RESET) {
+ retval = -1;
ioc_err(mrioc, "Cannot bring IOC to reset state\n");
goto out_failed;
}
@@ -3393,6 +3394,7 @@ int mpi3mr_init_ioc(struct mpi3mr_ioc *mrioc, u8 re_init)
if (re_init &&
(mrioc->shost->nr_hw_queues > mrioc->num_op_reply_q)) {
+ retval = -1;
ioc_err(mrioc,
"Cannot create minimum number of OpQueues expected:%d created:%d\n",
mrioc->shost->nr_hw_queues, mrioc->num_op_reply_q);