V4L/DVB (10619): gspca - main: Destroy the URBs at disconnection time.
authorAdam Baker <linux@baker-net.org.uk>
Wed, 4 Feb 2009 18:33:21 +0000 (15:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 17 Feb 2009 12:43:09 +0000 (09:43 -0300)
commitad28127d7c7c617bca1d426f95b6ffa1fb8f700f
tree1cdc54428ff54a316d212c7beeb13791cdac248b
parent28100165c3f27f681fee8b60e4e44f64a739c454
V4L/DVB (10619): gspca - main: Destroy the URBs at disconnection time.

If a device using the gspca framework is unplugged while it is still streaming
then the call that is used to free the URBs that have been allocated occurs
after the pointer it uses becomes invalid at the end of gspca_disconnect.
Make another cleanup call in gspca_disconnect while the pointer is still
valid (multiple calls are OK as destroy_urbs checks for pointers already
being NULL.

Signed-off-by: Adam Baker <linux@baker-net.org.uk>
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c