* [PATCH] scsi: lpfc: Fix error code if kcalloc() fails
@ 2019-02-11 18:43 Dan Carpenter
2019-02-11 20:19 ` Ewan D. Milne
2019-02-13 3:16 ` Martin K. Petersen
0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2019-02-11 18:43 UTC (permalink / raw)
To: kernel-janitors
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>
---
drivers/scsi/lpfc/lpfc_init.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
index 900edae7ccc4..aa801d2f36e5 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);
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: lpfc: Fix error code if kcalloc() fails
2019-02-11 18:43 [PATCH] scsi: lpfc: Fix error code if kcalloc() fails Dan Carpenter
@ 2019-02-11 20:19 ` Ewan D. Milne
2019-02-13 3:16 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Ewan D. Milne @ 2019-02-11 20:19 UTC (permalink / raw)
To: kernel-janitors
On Mon, 2019-02-11 at 21:43 +0300, Dan Carpenter wrote:
> 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>
> ---
> drivers/scsi/lpfc/lpfc_init.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index 900edae7ccc4..aa801d2f36e5 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);
Reviewed-by: Ewan D. Milne <emilne@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] scsi: lpfc: Fix error code if kcalloc() fails
2019-02-11 18:43 [PATCH] scsi: lpfc: Fix error code if kcalloc() fails Dan Carpenter
2019-02-11 20:19 ` Ewan D. Milne
@ 2019-02-13 3:16 ` Martin K. Petersen
1 sibling, 0 replies; 3+ messages in thread
From: Martin K. Petersen @ 2019-02-13 3:16 UTC (permalink / raw)
To: kernel-janitors
Dan,
> This should return -ENOMEM if kcalloc() fails, but it accidentally
> returns success instead.
Applied to 5.1/scsi-queue, thanks!
--
Martin K. Petersen Oracle Linux Engineering
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-02-13 3:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 18:43 [PATCH] scsi: lpfc: Fix error code if kcalloc() fails Dan Carpenter
2019-02-11 20:19 ` Ewan D. Milne
2019-02-13 3:16 ` Martin K. Petersen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.