aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-ixp2000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/busses/i2c-ixp2000.c')
-rw-r--r--drivers/i2c/busses/i2c-ixp2000.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/i2c/busses/i2c-ixp2000.c b/drivers/i2c/busses/i2c-ixp2000.c
index c3292dc743f1..42016ee6ef13 100644
--- a/drivers/i2c/busses/i2c-ixp2000.c
+++ b/drivers/i2c/busses/i2c-ixp2000.c
@@ -106,11 +106,10 @@ static int ixp2000_i2c_probe(struct device *dev)
106 struct platform_device *plat_dev = to_platform_device(dev); 106 struct platform_device *plat_dev = to_platform_device(dev);
107 struct ixp2000_i2c_pins *gpio = plat_dev->dev.platform_data; 107 struct ixp2000_i2c_pins *gpio = plat_dev->dev.platform_data;
108 struct ixp2000_i2c_data *drv_data = 108 struct ixp2000_i2c_data *drv_data =
109 kmalloc(sizeof(struct ixp2000_i2c_data), GFP_KERNEL); 109 kzalloc(sizeof(struct ixp2000_i2c_data), GFP_KERNEL);
110 110
111 if (!drv_data) 111 if (!drv_data)
112 return -ENOMEM; 112 return -ENOMEM;
113 memzero(drv_data, sizeof(*drv_data));
114 drv_data->gpio_pins = gpio; 113 drv_data->gpio_pins = gpio;
115 114
116 drv_data->algo_data.data = gpio; 115 drv_data->algo_data.data = gpio;