summaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorRakib Mullick <rakib.mullick@gmail.com>2011-07-25 17:12:56 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-25 20:57:13 -0700
commitf35119d6681300ba6d76da53cb1ebc2eed62e77a (patch)
tree0dfd0d1bf9acf3e48791059b50bc68fff01c4db9 /drivers/ata
parentf1c93e4946ae1cc268729451de6335a7e7d2bea9 (diff)
downloadblackbird-op-linux-f35119d6681300ba6d76da53cb1ebc2eed62e77a.tar.gz
blackbird-op-linux-f35119d6681300ba6d76da53cb1ebc2eed62e77a.zip
drivers: use kzalloc/kcalloc instead of 'kmalloc+memset', where possible
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com> Cc: Jeff Garzik <jgarzik@pobox.com> Cc: David Airlie <airlied@linux.ie> Cc: Tejun Heo <tj@kernel.org> Cc: Joe Perches <joe@perches.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/sata_dwc_460ex.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/ata/sata_dwc_460ex.c b/drivers/ata/sata_dwc_460ex.c
index b02c4ffa4db0..0a9a774a7e1e 100644
--- a/drivers/ata/sata_dwc_460ex.c
+++ b/drivers/ata/sata_dwc_460ex.c
@@ -1642,13 +1642,12 @@ static int sata_dwc_probe(struct platform_device *ofdev)
const struct ata_port_info *ppi[] = { &pi, NULL };
/* Allocate DWC SATA device */
- hsdev = kmalloc(sizeof(*hsdev), GFP_KERNEL);
+ hsdev = kzalloc(sizeof(*hsdev), GFP_KERNEL);
if (hsdev == NULL) {
dev_err(&ofdev->dev, "kmalloc failed for hsdev\n");
err = -ENOMEM;
goto error;
}
- memset(hsdev, 0, sizeof(*hsdev));
/* Ioremap SATA registers */
base = of_iomap(ofdev->dev.of_node, 0);
OpenPOWER on IntegriCloud