diff options
Diffstat (limited to 'drivers/i2c/busses/i2c-iop3xx.c')
-rw-r--r-- | drivers/i2c/busses/i2c-iop3xx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-iop3xx.c b/drivers/i2c/busses/i2c-iop3xx.c index 0f7dfd8f4546..9888fae1f37a 100644 --- a/drivers/i2c/busses/i2c-iop3xx.c +++ b/drivers/i2c/busses/i2c-iop3xx.c | |||
@@ -440,19 +440,17 @@ iop3xx_i2c_probe(struct device *dev) | |||
440 | struct i2c_adapter *new_adapter; | 440 | struct i2c_adapter *new_adapter; |
441 | struct i2c_algo_iop3xx_data *adapter_data; | 441 | struct i2c_algo_iop3xx_data *adapter_data; |
442 | 442 | ||
443 | new_adapter = kmalloc(sizeof(struct i2c_adapter), GFP_KERNEL); | 443 | new_adapter = kzalloc(sizeof(struct i2c_adapter), GFP_KERNEL); |
444 | if (!new_adapter) { | 444 | if (!new_adapter) { |
445 | ret = -ENOMEM; | 445 | ret = -ENOMEM; |
446 | goto out; | 446 | goto out; |
447 | } | 447 | } |
448 | memset((void*)new_adapter, 0, sizeof(*new_adapter)); | ||
449 | 448 | ||
450 | adapter_data = kmalloc(sizeof(struct i2c_algo_iop3xx_data), GFP_KERNEL); | 449 | adapter_data = kzalloc(sizeof(struct i2c_algo_iop3xx_data), GFP_KERNEL); |
451 | if (!adapter_data) { | 450 | if (!adapter_data) { |
452 | ret = -ENOMEM; | 451 | ret = -ENOMEM; |
453 | goto free_adapter; | 452 | goto free_adapter; |
454 | } | 453 | } |
455 | memset((void*)adapter_data, 0, sizeof(*adapter_data)); | ||
456 | 454 | ||
457 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 455 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
458 | if (!res) { | 456 | if (!res) { |