Commit a254eae3 authored by Yang Yingliang's avatar Yang Yingliang Committed by Martin K. Petersen

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: fb9b0457 ("scsi: mpi3mr: Add support for recovering controller")
Fixes: 824a1566 ("scsi: mpi3mr: Base driver code")
Reported-by: default avatarHulk Robot <hulkci@huawei.com>
Acked-by: default avatarKashyap Desai <kashyap.desai@broadcom.com>
Signed-off-by: default avatarYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent f9dc034d
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment