summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-19 20:53:32 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-03-19 20:53:32 +0100
commit811459fbe3478562cf110f89057144f59d4f78d5 (patch)
tree04652f671ee7a92fe8b15c711033f21e5e27b334 /linux/drivers/media/video
parentceb4d90514c368c0353069f902ab419f0957f142 (diff)
downloadmediapointer-dvb-s2-811459fbe3478562cf110f89057144f59d4f78d5.tar.gz
mediapointer-dvb-s2-811459fbe3478562cf110f89057144f59d4f78d5.tar.bz2
tvaudio: always call init_timer to prevent rmmod crash.
From: Hans Verkuil <hverkuil@xs4all.nl> 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. Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/tvaudio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/tvaudio.c b/linux/drivers/media/video/tvaudio.c
index d92b2d4b5..39d796908 100644
--- a/linux/drivers/media/video/tvaudio.c
+++ b/linux/drivers/media/video/tvaudio.c
@@ -2062,6 +2062,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
@@ -2071,7 +2072,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);