[PATCH] scsi: lpfc: use kcalloc instead of kzalloc
Matei Oprea
eu at opreamatei.ro
Wed Sep 17 00:26:21 EEST 2014
Final version. Sorry for the spam. Had some problems with git send-email.
ᐧ
On Wed, Sep 17, 2014 at 12:25 AM, Matei Oprea <eu at opreamatei.ro> wrote:
> It's easier to use kcalloc for allocating arrays.
>
> Signed-off-by: Matei Oprea <eu at opreamatei.ro>
> Cc: ROSEdu Kernel Community <firefly at lists.rosedu.org>
> ---
> drivers/scsi/lpfc/lpfc_init.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/scsi/lpfc/lpfc_init.c b/drivers/scsi/lpfc/lpfc_init.c
> index a5769a9..f10a45e 100644
> --- a/drivers/scsi/lpfc/lpfc_init.c
> +++ b/drivers/scsi/lpfc/lpfc_init.c
> @@ -4854,9 +4854,9 @@ lpfc_sli_driver_resource_setup(struct lpfc_hba *phba)
> }
>
> if (!phba->sli.ring)
> - phba->sli.ring = (struct lpfc_sli_ring *)
> - kzalloc(LPFC_SLI3_MAX_RING *
> - sizeof(struct lpfc_sli_ring), GFP_KERNEL);
> + phba->sli.ring = kcalloc(LPFC_SLI3_MAX_RING,
> + sizeof(struct lpfc_sli_ring),
> + GFP_KERNEL);
> if (!phba->sli.ring)
> return -ENOMEM;
>
> --
> 1.7.10.4
>
>
--
Oprea Matei
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rosedu.org/pipermail/firefly/attachments/20140917/23e7527b/attachment.html>
More information about the firefly
mailing list