aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-mv64xxx.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-mv64xxx.c')
-rw-r--r--drivers/i2c/busses/i2c-mv64xxx.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-mv64xxx.c b/drivers/i2c/busses/i2c-mv64xxx.c
index 69709ee0b896..d0d2a6f1386e 100644
--- a/drivers/i2c/busses/i2c-mv64xxx.c
+++ b/drivers/i2c/busses/i2c-mv64xxx.c
@@ -500,13 +500,10 @@ mv64xxx_i2c_probe(struct device *dev)
500 if ((pd->id != 0) || !pdata) 500 if ((pd->id != 0) || !pdata)
501 return -ENODEV; 501 return -ENODEV;
502 502
503 drv_data = kmalloc(sizeof(struct mv64xxx_i2c_data), GFP_KERNEL); 503 drv_data = kzalloc(sizeof(struct mv64xxx_i2c_data), GFP_KERNEL);
504
505 if (!drv_data) 504 if (!drv_data)
506 return -ENOMEM; 505 return -ENOMEM;
507 506
508 memset(drv_data, 0, sizeof(struct mv64xxx_i2c_data));
509
510 if (mv64xxx_i2c_map_regs(pd, drv_data)) { 507 if (mv64xxx_i2c_map_regs(pd, drv_data)) {
511 rc = -ENODEV; 508 rc = -ENODEV;
512 goto exit_kfree; 509 goto exit_kfree;