aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt819.c
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-01-11 16:40:56 -0500
committerMauro Carvalho Chehab <mchehab@brturbo.com.br>2006-01-11 16:40:56 -0500
commit7408187d223f63d46a13b6a35b8f96b032c2f623 (patch)
tree425a459f760295de488f57e3f97b034aaa76a78d /drivers/media/video/bt819.c
parent0b3af1b6df82cfdb54ae294ed860263011fa0408 (diff)
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 <takis@issaris.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/bt819.c')
-rw-r--r--drivers/media/video/bt819.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/media/video/bt819.c b/drivers/media/video/bt819.c
index 560b99891753..d6447791d0e5 100644
--- a/drivers/media/video/bt819.c
+++ b/drivers/media/video/bt819.c
@@ -528,21 +528,18 @@ bt819_detect_client (struct i2c_adapter *adapter,
528 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA)) 528 if (!i2c_check_functionality(adapter, I2C_FUNC_SMBUS_BYTE_DATA))
529 return 0; 529 return 0;
530 530
531 client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); 531 client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
532 if (client == 0) 532 if (client == 0)
533 return -ENOMEM; 533 return -ENOMEM;
534 memset(client, 0, sizeof(struct i2c_client));
535 client->addr = address; 534 client->addr = address;
536 client->adapter = adapter; 535 client->adapter = adapter;
537 client->driver = &i2c_driver_bt819; 536 client->driver = &i2c_driver_bt819;
538 537
539 decoder = kmalloc(sizeof(struct bt819), GFP_KERNEL); 538 decoder = kzalloc(sizeof(struct bt819), GFP_KERNEL);
540 if (decoder == NULL) { 539 if (decoder == NULL) {
541 kfree(client); 540 kfree(client);
542 return -ENOMEM; 541 return -ENOMEM;
543 } 542 }
544
545 memset(decoder, 0, sizeof(struct bt819));
546 decoder->norm = VIDEO_MODE_NTSC; 543 decoder->norm = VIDEO_MODE_NTSC;
547 decoder->input = 0; 544 decoder->input = 0;
548 decoder->enable = 1; 545 decoder->enable = 1;