[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>
This commit is contained in:
parent
81c2af3561
commit
9a5314432a
1 changed files with 1 additions and 2 deletions
|
@ -407,13 +407,12 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
|
||||||
if (rc)
|
if (rc)
|
||||||
goto err_out_regions;
|
goto err_out_regions;
|
||||||
|
|
||||||
probe_ent = kmalloc(sizeof(*probe_ent), GFP_KERNEL);
|
probe_ent = kzalloc(sizeof(*probe_ent), GFP_KERNEL);
|
||||||
if (probe_ent == NULL) {
|
if (probe_ent == NULL) {
|
||||||
rc = -ENOMEM;
|
rc = -ENOMEM;
|
||||||
goto err_out_regions;
|
goto err_out_regions;
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(probe_ent, 0, sizeof(*probe_ent));
|
|
||||||
INIT_LIST_HEAD(&probe_ent->node);
|
INIT_LIST_HEAD(&probe_ent->node);
|
||||||
probe_ent->dev = pci_dev_to_dev(pdev);
|
probe_ent->dev = pci_dev_to_dev(pdev);
|
||||||
probe_ent->port_ops = sil_port_info[ent->driver_data].port_ops;
|
probe_ent->port_ops = sil_port_info[ent->driver_data].port_ops;
|
||||||
|
|
Loading…
Add table
Reference in a new issue