diff mbox

[1/1] scsi: use kzalloc for allocating one thing

Message ID 1434602194-14484-1-git-send-email-maninder1.s@samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Maninder Singh June 18, 2015, 4:36 a.m. UTC
Use kzalloc rather than kcalloc(1,...) for allocating one thing

Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
Reviewed-by: Vaneet Narang <v.narang@samsung.com>
---
 drivers/scsi/mvsas/mv_init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Hannes Reinecke June 18, 2015, 5:52 a.m. UTC | #1
On 06/18/2015 06:36 AM, Maninder Singh wrote:
> Use kzalloc rather than kcalloc(1,...) for allocating one thing
> 
> Signed-off-by: Maninder Singh <maninder1.s@samsung.com>
> Reviewed-by: Vaneet Narang <v.narang@samsung.com>
> ---
>  drivers/scsi/mvsas/mv_init.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
> index d40d734..65e47eb 100644
> --- a/drivers/scsi/mvsas/mv_init.c
> +++ b/drivers/scsi/mvsas/mv_init.c
> @@ -558,7 +558,7 @@ static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	chip = &mvs_chips[ent->driver_data];
>  	SHOST_TO_SAS_HA(shost) =
> -		kcalloc(1, sizeof(struct sas_ha_struct), GFP_KERNEL);
> +		kzalloc(sizeof(struct sas_ha_struct), GFP_KERNEL);
>  	if (!SHOST_TO_SAS_HA(shost)) {
>  		kfree(shost);
>  		rc = -ENOMEM;
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/scsi/mvsas/mv_init.c b/drivers/scsi/mvsas/mv_init.c
index d40d734..65e47eb 100644
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -558,7 +558,7 @@  static int mvs_pci_init(struct pci_dev *pdev, const struct pci_device_id *ent)
 
 	chip = &mvs_chips[ent->driver_data];
 	SHOST_TO_SAS_HA(shost) =
-		kcalloc(1, sizeof(struct sas_ha_struct), GFP_KERNEL);
+		kzalloc(sizeof(struct sas_ha_struct), GFP_KERNEL);
 	if (!SHOST_TO_SAS_HA(shost)) {
 		kfree(shost);
 		rc = -ENOMEM;