diff options
author | Mariusz Kozlowski <m.kozlowski@tuxland.pl> | 2007-07-31 17:04:57 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-07-31 17:04:57 -0400 |
commit | 50aa485e1abb7566ce68418c7bbc6a6b454f9039 (patch) | |
tree | 15809f24f309c9062b949349e2934de6243a8aa0 /drivers/sbus/char/bbc_i2c.c | |
parent | 916e89fdd1b21eec4abbc9e228757db77660fff2 (diff) |
[BBC_I2C]: kmalloc + memset conversion to kzalloc
Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/sbus/char/bbc_i2c.c')
-rw-r--r-- | drivers/sbus/char/bbc_i2c.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/sbus/char/bbc_i2c.c b/drivers/sbus/char/bbc_i2c.c index fbadd4d761f3..ac8ef2ce07fb 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) | |||
357 | 357 | ||
358 | static int __init attach_one_i2c(struct linux_ebus_device *edev, int index) | 358 | static int __init attach_one_i2c(struct linux_ebus_device *edev, int index) |
359 | { | 359 | { |
360 | struct bbc_i2c_bus *bp = kmalloc(sizeof(*bp), GFP_KERNEL); | 360 | struct bbc_i2c_bus *bp; |
361 | struct linux_ebus_child *echild; | 361 | struct linux_ebus_child *echild; |
362 | int entry; | 362 | int entry; |
363 | 363 | ||
364 | bp = kzalloc(sizeof(*bp), GFP_KERNEL); | ||
364 | if (!bp) | 365 | if (!bp) |
365 | return -ENOMEM; | 366 | return -ENOMEM; |
366 | memset(bp, 0, sizeof(*bp)); | ||
367 | 367 | ||
368 | bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2); | 368 | bp->i2c_control_regs = ioremap(edev->resource[0].start, 0x2); |
369 | if (!bp->i2c_control_regs) | 369 | if (!bp->i2c_control_regs) |