summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter2019-02-11 19:43:00 +0100
committerMartin K. Petersen2019-02-13 04:15:54 +0100
commitfad28e3d9aa14522e33694b63ccccdf28e64a8e0 (patch)
tree576aad580a78bf4e50ec59c493bdfea9e7576905
parentscsi: ufs: fix a typo in comment (diff)
downloadkernel-qcow2-linux-fad28e3d9aa14522e33694b63ccccdf28e64a8e0.tar.gz
kernel-qcow2-linux-fad28e3d9aa14522e33694b63ccccdf28e64a8e0.tar.xz
kernel-qcow2-linux-fad28e3d9aa14522e33694b63ccccdf28e64a8e0.zip
scsi: lpfc: Fix error code if kcalloc() fails
This should return -ENOMEM if kcalloc() fails, but it accidentally returns success instead. Fixes: 6a828b0f6192 ("scsi: lpfc: Support non-uniform allocation of MSIX vectors to hardware queues") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Ewan D. Milne <emilne@redhat.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index d24af076afa8..eef6b929c327 100644
--- a/drivers/scsi/lpfc/lpfc_init.c
+++ b/drivers/scsi/lpfc/lpfc_init.c
@@ -9638,6 +9638,7 @@ lpfc_sli4_queue_setup(struct lpfc_hba *phba)
lpfc_printf_log(phba, KERN_ERR, LOG_INIT,
"0549 Failed setup of CQ Lookup table: "
"size 0x%x\n", phba->sli4_hba.cq_max);
+ rc = -ENOMEM;
goto out_destroy;
}
lpfc_setup_cq_lookup(phba);