aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tvaudio.c
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-19 15:53:32 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 11:43:46 -0400
commite4129a9ccea54e8f4fbc408476120059809a4627 (patch)
tree00b1544084df8fec5252ba8f7032c085c5b42402 /drivers/media/video/tvaudio.c
parent411674fd189abe5910ea4caf08b7eac5c4a4d967 (diff)
V4L/DVB (11277): tvaudio: always call init_timer to prevent rmmod crash.
In the tvaudio_remove function del_timer_sync(&chip->wt) is called. However, chip->wt isn't always initialized depending on the type of audio chip. Since del_timer_sync hangs when given an uninitialized timer we should always initialize it. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/tvaudio.c')
-rw-r--r--drivers/media/video/tvaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/tvaudio.c b/drivers/media/video/tvaudio.c
index 8333efab8685..226bf3565ac9 100644
--- a/drivers/media/video/tvaudio.c
+++ b/drivers/media/video/tvaudio.c
@@ -2050,6 +2050,7 @@ static int tvaudio_probe(struct i2c_client *client, const struct i2c_device_id *
2050 } 2050 }
2051 2051
2052 chip->thread = NULL; 2052 chip->thread = NULL;
2053 init_timer(&chip->wt);
2053 if (desc->flags & CHIP_NEED_CHECKMODE) { 2054 if (desc->flags & CHIP_NEED_CHECKMODE) {
2054 if (!desc->getmode || !desc->setmode) { 2055 if (!desc->getmode || !desc->setmode) {
2055 /* This shouldn't be happen. Warn user, but keep working 2056 /* This shouldn't be happen. Warn user, but keep working
@@ -2059,7 +2060,6 @@ static int tvaudio_probe(struct i2c_client *client, const struct i2c_device_id *
2059 return 0; 2060 return 0;
2060 } 2061 }
2061 /* start async thread */ 2062 /* start async thread */
2062 init_timer(&chip->wt);
2063 chip->wt.function = chip_thread_wake; 2063 chip->wt.function = chip_thread_wake;
2064 chip->wt.data = (unsigned long)chip; 2064 chip->wt.data = (unsigned long)chip;
2065 chip->thread = kthread_run(chip_thread, chip, client->name); 2065 chip->thread = kthread_run(chip_thread, chip, client->name);