diff options
author | Deepak Saxena <dsaxena@plexity.net> | 2005-10-17 17:09:43 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 17:02:12 -0400 |
commit | 5263ebb51eb098b01caf229498c954999117e4a7 (patch) | |
tree | f18933c0b38a51ba9f100e7be4f5f5d54838cf45 /drivers/i2c/busses/i2c-mv64xxx.c | |
parent | ba9c2e8d15da029ea3051c95e446b2d638ef02e2 (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-mv64xxx.c')
-rw-r--r-- | drivers/i2c/busses/i2c-mv64xxx.c | 5 |
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; |