aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-19 16:53:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:43:46 -0300
commite4129a9ccea54e8f4fbc408476120059809a4627 (patch)
tree00b1544084df8fec5252ba8f7032c085c5b42402
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>
-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 8333efab868..226bf3565ac 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 *
}
chip->thread = NULL;
+ init_timer(&chip->wt);
if (desc->flags & CHIP_NEED_CHECKMODE) {
if (!desc->getmode || !desc->setmode) {
/* 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 *
return 0;
}
/* start async thread */
- init_timer(&chip->wt);
chip->wt.function = chip_thread_wake;
chip->wt.data = (unsigned long)chip;
chip->thread = kthread_run(chip_thread, chip, client->name);