diff options
Diffstat (limited to 'drivers/i2c/busses/scx200_acb.c')
-rw-r--r-- | drivers/i2c/busses/scx200_acb.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/scx200_acb.c b/drivers/i2c/busses/scx200_acb.c index a1d580e05361..d3478e084522 100644 --- a/drivers/i2c/busses/scx200_acb.c +++ b/drivers/i2c/busses/scx200_acb.c | |||
@@ -442,14 +442,13 @@ static int __init scx200_acb_create(int base, int index) | |||
442 | int rc = 0; | 442 | int rc = 0; |
443 | char description[64]; | 443 | char description[64]; |
444 | 444 | ||
445 | iface = kmalloc(sizeof(*iface), GFP_KERNEL); | 445 | iface = kzalloc(sizeof(*iface), GFP_KERNEL); |
446 | if (!iface) { | 446 | if (!iface) { |
447 | printk(KERN_ERR NAME ": can't allocate memory\n"); | 447 | printk(KERN_ERR NAME ": can't allocate memory\n"); |
448 | rc = -ENOMEM; | 448 | rc = -ENOMEM; |
449 | goto errout; | 449 | goto errout; |
450 | } | 450 | } |
451 | 451 | ||
452 | memset(iface, 0, sizeof(*iface)); | ||
453 | adapter = &iface->adapter; | 452 | adapter = &iface->adapter; |
454 | i2c_set_adapdata(adapter, iface); | 453 | i2c_set_adapdata(adapter, iface); |
455 | snprintf(adapter->name, I2C_NAME_SIZE, "SCx200 ACB%d", index); | 454 | snprintf(adapter->name, I2C_NAME_SIZE, "SCx200 ACB%d", index); |