aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-ibm_iic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-ibm_iic.c')
-rw-r--r--drivers/i2c/busses/i2c-ibm_iic.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-ibm_iic.c b/drivers/i2c/busses/i2c-ibm_iic.c
index a3ed9590f028..1a587253d716 100644
--- a/drivers/i2c/busses/i2c-ibm_iic.c
+++ b/drivers/i2c/busses/i2c-ibm_iic.c
@@ -672,13 +672,12 @@ static int __devinit iic_probe(struct ocp_device *ocp){
672 printk(KERN_WARNING"ibm-iic%d: missing additional data!\n", 672 printk(KERN_WARNING"ibm-iic%d: missing additional data!\n",
673 ocp->def->index); 673 ocp->def->index);
674 674
675 if (!(dev = kmalloc(sizeof(*dev), GFP_KERNEL))){ 675 if (!(dev = kzalloc(sizeof(*dev), GFP_KERNEL))) {
676 printk(KERN_CRIT "ibm-iic%d: failed to allocate device data\n", 676 printk(KERN_CRIT "ibm-iic%d: failed to allocate device data\n",
677 ocp->def->index); 677 ocp->def->index);
678 return -ENOMEM; 678 return -ENOMEM;
679 } 679 }
680 680
681 memset(dev, 0, sizeof(*dev));
682 dev->idx = ocp->def->index; 681 dev->idx = ocp->def->index;
683 ocp_set_drvdata(ocp, dev); 682 ocp_set_drvdata(ocp, dev);
684 683