]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
[PATCH] saa7134: fix thread shutdown handling
authorJeff Mahoney <jeffm@suse.com>
Wed, 27 Jun 2007 21:09:58 +0000 (14:09 -0700)
committerWilly Tarreau <w@1wt.eu>
Wed, 15 Aug 2007 08:02:34 +0000 (10:02 +0200)
commit2ead8a28fdb20999c5c90b4cb6cc37f97321117a
tree1e5d42f3c154124b36ee37dee0d504e87a19b461
parent356177f4dac83a81bee944b8776709bb6b62a338
[PATCH] saa7134: fix thread shutdown handling

This patch changes the test for the thread pid from >= 0 to > 0.

When the saa7134 driver initialization fails after a certain point, it goes
through the complete shutdown process for the driver.  Part of shutting it
down includes tearing down the thread for tv audio.

The test for tearing down the thread tests for >= 0.  Since the dev
structure is kzalloc'd, the test will always be true if we haven't tried to
start the thread yet.  We end up waiting on pid 0 to complete, which will
never happen, so we lock up.

This bug was observed in Novell Bugzilla 284718, when request_irq() failed.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Acked-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/media/video/saa7134/saa7134-tvaudio.c