aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses/i2c-iop3xx.c
diff options
context:
space:
mode:
authorDeepak Saxena <dsaxena@plexity.net>2005-10-17 17:09:43 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-10-28 17:02:12 -0400
commit5263ebb51eb098b01caf229498c954999117e4a7 (patch)
treef18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/busses/i2c-iop3xx.c
parentba9c2e8d15da029ea3051c95e446b2d638ef02e2 (diff)
[PATCH] i2c: kzalloc conversion, other drivers
Use kzalloc instead of kmalloc+memset in all remaining i2c bus and chip drivers. Signed-off-by: Deepak Saxena <dsaxena@plexity.net> Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/i2c/busses/i2c-iop3xx.c')
-rw-r--r--drivers/i2c/busses/i2c-iop3xx.c6
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) {