aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tuner-core.c')
-rw-r--r--drivers/media/video/tuner-core.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c
index 57bc585a6955..89d013ce5edb 100644
--- a/drivers/media/video/tuner-core.c
+++ b/drivers/media/video/tuner-core.c
@@ -410,10 +410,9 @@ static int tuner_attach(struct i2c_adapter *adap, int addr, int kind)
410 client_template.adapter = adap; 410 client_template.adapter = adap;
411 client_template.addr = addr; 411 client_template.addr = addr;
412 412
413 t = kmalloc(sizeof(struct tuner), GFP_KERNEL); 413 t = kzalloc(sizeof(struct tuner), GFP_KERNEL);
414 if (NULL == t) 414 if (NULL == t)
415 return -ENOMEM; 415 return -ENOMEM;
416 memset(t, 0, sizeof(struct tuner));
417 memcpy(&t->i2c, &client_template, sizeof(struct i2c_client)); 416 memcpy(&t->i2c, &client_template, sizeof(struct i2c_client));
418 i2c_set_clientdata(&t->i2c, t); 417 i2c_set_clientdata(&t->i2c, t);
419 t->type = UNSET; 418 t->type = UNSET;