aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/common/locomo.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-03-20 14:46:41 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-03-21 17:06:17 -0500
commitd2a02b93cf78205dd23226efb66481569900976e (patch)
tree94760abdafe5cb72a41d3edd405a26d0c8e2e0d3 /arch/arm/common/locomo.c
parent18ec5c731271939acb414614e964c15c8ef52156 (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/locomo.c')
-rw-r--r--arch/arm/common/locomo.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/arch/arm/common/locomo.c b/arch/arm/common/locomo.c
index 787e0d027f04..a7dc1370695b 100644
--- a/arch/arm/common/locomo.c
+++ b/arch/arm/common/locomo.c
@@ -501,12 +501,11 @@ locomo_init_one_child(struct locomo *lchip, struct locomo_dev_info *info)
501 struct locomo_dev *dev; 501 struct locomo_dev *dev;
502 int ret; 502 int ret;
503 503
504 dev = kmalloc(sizeof(struct locomo_dev), GFP_KERNEL); 504 dev = kzalloc(sizeof(struct locomo_dev), GFP_KERNEL);
505 if (!dev) { 505 if (!dev) {
506 ret = -ENOMEM; 506 ret = -ENOMEM;
507 goto out; 507 goto out;
508 } 508 }
509 memset(dev, 0, sizeof(struct locomo_dev));
510 509
511 strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id)); 510 strncpy(dev->dev.bus_id,info->name,sizeof(dev->dev.bus_id));
512 /* 511 /*
@@ -664,12 +663,10 @@ __locomo_probe(struct device *me, struct resource *mem, int irq)
664 unsigned long r; 663 unsigned long r;
665 int i, ret = -ENODEV; 664 int i, ret = -ENODEV;
666 665
667 lchip = kmalloc(sizeof(struct locomo), GFP_KERNEL); 666 lchip = kzalloc(sizeof(struct locomo), GFP_KERNEL);
668 if (!lchip) 667 if (!lchip)
669 return -ENOMEM; 668 return -ENOMEM;
670 669
671 memset(lchip, 0, sizeof(struct locomo));
672
673 spin_lock_init(&lchip->lock); 670 spin_lock_init(&lchip->lock);
674 671
675 lchip->dev = me; 672 lchip->dev = me;