]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
V4L/DVB (10378): gspca - main: Avoid error on set interface on disconnection.
authorJean-Francois Moine <moinejf@free.fr>
Tue, 20 Jan 2009 19:21:44 +0000 (16:21 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 30 Mar 2009 15:42:33 +0000 (12:42 -0300)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c

index db22e3c24764a4fa64ab88b8e244429651160cc3..0680602316306a2f53f7d672744598c50032ee19 100644 (file)
@@ -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");