aboutsummaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-01-20 16:21:44 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 12:42:33 -0300
commitd08e2ce0ebb38f2b66d875a09ebab3ed548354ee (patch)
treec3eaa3fedde2d54ccbe29741dde3a0593188258e /drivers/media
parentc314b53bdd2059860ae49c0cd1256d9c60b185fd (diff)
V4L/DVB (10378): gspca - main: Avoid error on set interface on disconnection.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/gspca/gspca.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index db22e3c2476..06806023163 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -666,7 +666,8 @@ static void gspca_stream_off(struct gspca_dev *gspca_dev)
&& gspca_dev->sd_desc->stopN)
gspca_dev->sd_desc->stopN(gspca_dev);
destroy_urbs(gspca_dev);
- gspca_set_alt0(gspca_dev);
+ if (gspca_dev->present)
+ gspca_set_alt0(gspca_dev);
if (gspca_dev->sd_desc->stop0)
gspca_dev->sd_desc->stop0(gspca_dev);
PDEBUG(D_STREAM, "stream off OK");