From: Mariusz Kozlowski Date: Tue, 31 Jul 2007 21:04:57 +0000 (-0700) Subject: [BBC_I2C]: kmalloc + memset conversion to kzalloc X-Git-Tag: v2.6.23-rc2~36^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50aa485e1abb7566ce68418c7bbc6a6b454f9039;p=linux-2.6 [BBC_I2C]: kmalloc + memset conversion to kzalloc Signed-off-by: Mariusz Kozlowski Signed-off-by: David S. Miller --- diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index fbadd4d761..ac8ef2ce07 100644 --- a/drivers/sbus/char/bbc_i2c.c +++ b/drivers/sbus/char/bbc_i2c.c @@ -357,13 +357,13 @@ static void __init reset_one_i2c(struct bbc_i2c_bus *bp) static int __init attach_one_i2c(struct linux_ebus_device *edev, int index) { - struct bbc_i2c_bus *bp = kmalloc(sizeof(*bp), GFP_KERNEL); + struct bbc_i2c_bus *bp; struct linux_ebus_child *echild; int entry; + bp = kzalloc(sizeof(*bp), GFP_KERNEL); if (!bp) return -ENOMEM; - memset(bp, 0, sizeof(*bp)); bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2); if (!bp->i2c_control_regs)