From: Dan Carpenter Date: Mon, 11 Feb 2019 18:43:00 +0000 (+0300) Subject: scsi: lpfc: Fix error code if kcalloc() fails X-Git-Tag: Ubuntu-5.10.0-12.13~5836^2~43 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=fad28e3d9aa14522e33694b63ccccdf28e64a8e0;p=mirror_ubuntu-hirsute-kernel.git 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 Reviewed-by: Ewan D. Milne Signed-off-by: Martin K. Petersen --- 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);