diff options
author | Rakib Mullick <rakib.mullick@gmail.com> | 2011-07-26 04:12:56 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-26 07:57:13 +0400 |
commit | f35119d6681300ba6d76da53cb1ebc2eed62e77a (patch) | |
tree | 0dfd0d1bf9acf3e48791059b50bc68fff01c4db9 /drivers/ata/sata_dwc_460ex.c | |
parent | f1c93e4946ae1cc268729451de6335a7e7d2bea9 (diff) | |
download | linux-f35119d6681300ba6d76da53cb1ebc2eed62e77a.tar.xz |
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/sata_dwc_460ex.c')
-rw-r--r-- | drivers/ata/sata_dwc_460ex.c | 3 |
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); |