From 7408187d223f63d46a13b6a35b8f96b032c2f623 Mon Sep 17 00:00:00 2001 From: Panagiotis Issaris Date: Wed, 11 Jan 2006 19:40:56 -0200 Subject: V4L/DVB (3344a): Conversions from kmalloc+memset to k(z|c)alloc Conversions from kmalloc+memset to k(z|c)alloc. Signed-off-by: Panagiotis Issaris Signed-off-by: Andrew Morton Signed-off-by: Mauro Carvalho Chehab --- drivers/media/video/tveeprom.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'drivers/media/video/tveeprom.c') diff --git a/drivers/media/video/tveeprom.c b/drivers/media/video/tveeprom.c index fd0acc5..5e71a35 100644 --- a/drivers/media/video/tveeprom.c +++ b/drivers/media/video/tveeprom.c @@ -719,8 +719,7 @@ tveeprom_command(struct i2c_client *client, switch (cmd) { case 0: - buf = kmalloc(256,GFP_KERNEL); - memset(buf,0,256); + buf = kzalloc(256,GFP_KERNEL); tveeprom_read(client,buf,256); tveeprom_hauppauge_analog(client, &eeprom,buf); kfree(buf); @@ -743,10 +742,9 @@ tveeprom_detect_client(struct i2c_adapter *adapter, { struct i2c_client *client; - client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); + client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL); if (NULL == client) return -ENOMEM; - memset(client, 0, sizeof(struct i2c_client)); client->addr = address; client->adapter = adapter; client->driver = &i2c_driver_tveeprom; -- cgit v1.1