aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sata_sil.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2006-03-05 02:03:52 -0500
committerJeff Garzik <jeff@garzik.org>2006-03-05 02:39:55 -0500
commit9a5314432a07251c2a8d71bfc793adcf00f4122e (patch)
treeb5becc8c3cf7bfb60200bdeb344a6cfc509e9fcf /drivers/scsi/sata_sil.c
parent81c2af3561db54a4d3b439c84c58d8c2a469ec9b (diff)
[PATCH] sata_sil: use kzalloc
Use kzalloc instead of kmalloc/memset. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/scsi/sata_sil.c')
-rw-r--r--drivers/scsi/sata_sil.c3
1 files changed, 1 insertions, 2 deletions
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)
407 if (rc) 407 if (rc)
408 goto err_out_regions; 408 goto err_out_regions;
409 409
410 probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL); 410 probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL);
411 if (probe_ent == NULL) { 411 if (probe_ent == NULL) {
412 rc = -ENOMEM; 412 rc = -ENOMEM;
413 goto err_out_regions; 413 goto err_out_regions;
414 } 414 }
415 415
416 memset(probe_ent, 0, sizeof(*probe_ent));
417 INIT_LIST_HEAD(&probe_ent->node); 416 INIT_LIST_HEAD(&probe_ent->node);
418 probe_ent->dev = pci_dev_to_dev(pdev); 417 probe_ent->dev = pci_dev_to_dev(pdev);
419 probe_ent->port_ops = sil_port_info[ent->driver_data].port_ops; 418 probe_ent->port_ops = sil_port_info[ent->driver_data].port_ops;