aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/bt819.c
diff options
context:
space:
mode:
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 560b9989175..d6447791d0e 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;