forked from luck/tmp_suning_uos_patched
[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
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue
Block a user