From: Tejun Heo Date: Sun, 5 Mar 2006 07:03:52 +0000 (+0900) Subject: [PATCH] sata_sil: use kzalloc X-Git-Tag: firefly_0821_release~37605^2~32 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9a5314432a07251c2a8d71bfc793adcf00f4122e;p=firefly-linux-kernel-4.4.55.git [PATCH] sata_sil: use kzalloc Use kzalloc instead of kmalloc/memset. Signed-off-by: Tejun Heo Signed-off-by: Jeff Garzik --- diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 8cb662d537a3..5cdcb9db3e71 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -407,13 +407,12 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) if (rc) goto err_out_regions; - probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL); + probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL); if (probe_ent == NULL) { rc = -ENOMEM; goto err_out_regions; } - memset(probe_ent, 0, sizeof(*probe_ent)); INIT_LIST_HEAD(&probe_ent->node); probe_ent->dev = pci_dev_to_dev(pdev); probe_ent->port_ops = sil_port_info[ent->driver_data].port_ops;