Commit 3dbf6c00 authored by Julia Lawall's avatar Julia Lawall Committed by James Bottomley

[SCSI] pm8001: Use kzalloc for allocating only one thing

Use kzalloc rather than kcalloc(1,...)

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
@@

- kcalloc(1,
+ kzalloc(
          ...)
// </smpl>
Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
Acked-by: default avatarJack Wang <jack_wang@usish.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@suse.de>
parent 4ffd005a
...@@ -654,7 +654,7 @@ static int __devinit pm8001_pci_probe(struct pci_dev *pdev, ...@@ -654,7 +654,7 @@ static int __devinit pm8001_pci_probe(struct pci_dev *pdev,
} }
chip = &pm8001_chips[ent->driver_data]; chip = &pm8001_chips[ent->driver_data];
SHOST_TO_SAS_HA(shost) = 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)) { if (!SHOST_TO_SAS_HA(shost)) {
rc = -ENOMEM; rc = -ENOMEM;
goto err_out_free_host; goto err_out_free_host;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment