lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 18 Jun 2015 07:52:31 +0200
From:	Hannes Reinecke <hare@...e.de>
To:	Maninder Singh <maninder1.s@...sung.com>, JBottomley@...n.com,
	hch@....de, michaelc@...wisc.edu, martin.petersen@...cle.com,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org
CC:	pankaj.m@...sung.com
Subject: Re: [PATCH 1/1] scsi: use kzalloc for allocating one thing

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@...sung.com>
> Reviewed-by: Vaneet Narang <v.narang@...sung.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@...e.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare@...e.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ