Commit 50aa485e authored by Mariusz Kozlowski's avatar Mariusz Kozlowski Committed by David S. Miller

[BBC_I2C]: kmalloc + memset conversion to kzalloc

Signed-off-by: default avatarMariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 916e89fd
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment