diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-03-20 14:46:41 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-03-21 17:06:17 -0500 |
commit | d2a02b93cf78205dd23226efb66481569900976e (patch) | |
tree | 94760abdafe5cb72a41d3edd405a26d0c8e2e0d3 /arch/arm/common/sa1111.c | |
parent | 18ec5c731271939acb414614e964c15c8ef52156 (diff) |
[ARM] Convert kmalloc+memset to kzalloc
Convert all uses of kmalloc followed by memset to use kzalloc instead.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/common/sa1111.c')
-rw-r--r-- | arch/arm/common/sa1111.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 5ba1ee042349..3f68db84e5e6 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -541,12 +541,11 @@ sa1111_init_one_child(struct sa1111 *sachip, struct resource *parent, | |||
541 | struct sa1111_dev *dev; | 541 | struct sa1111_dev *dev; |
542 | int ret; | 542 | int ret; |
543 | 543 | ||
544 | dev = kmalloc(sizeof(struct sa1111_dev), GFP_KERNEL); | 544 | dev = kzalloc(sizeof(struct sa1111_dev), GFP_KERNEL); |
545 | if (!dev) { | 545 | if (!dev) { |
546 | ret = -ENOMEM; | 546 | ret = -ENOMEM; |
547 | goto out; | 547 | goto out; |
548 | } | 548 | } |
549 | memset(dev, 0, sizeof(struct sa1111_dev)); | ||
550 | 549 | ||
551 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), | 550 | snprintf(dev->dev.bus_id, sizeof(dev->dev.bus_id), |
552 | "%4.4lx", info->offset); | 551 | "%4.4lx", info->offset); |
@@ -621,12 +620,10 @@ __sa1111_probe(struct device *me, struct resource *mem, int irq) | |||
621 | unsigned int has_devs, val; | 620 | unsigned int has_devs, val; |
622 | int i, ret = -ENODEV; | 621 | int i, ret = -ENODEV; |
623 | 622 | ||
624 | sachip = kmalloc(sizeof(struct sa1111), GFP_KERNEL); | 623 | sachip = kzalloc(sizeof(struct sa1111), GFP_KERNEL); |
625 | if (!sachip) | 624 | if (!sachip) |
626 | return -ENOMEM; | 625 | return -ENOMEM; |
627 | 626 | ||
628 | memset(sachip, 0, sizeof(struct sa1111)); | ||
629 | |||
630 | sachip->clk = clk_get(me, "GPIO27_CLK"); | 627 | sachip->clk = clk_get(me, "GPIO27_CLK"); |
631 | if (!sachip->clk) { | 628 | if (!sachip->clk) { |
632 | ret = PTR_ERR(sachip->clk); | 629 | ret = PTR_ERR(sachip->clk); |