From: Jean-Francois Moine Date: Tue, 20 Jan 2009 19:21:44 +0000 (-0300) Subject: V4L/DVB (10378): gspca - main: Avoid error on set interface on disconnection. X-Git-Tag: MMI-PSA29.97-13-9~29189^2~612 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d08e2ce0ebb38f2b66d875a09ebab3ed548354ee;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git V4L/DVB (10378): gspca - main: Avoid error on set interface on disconnection. Signed-off-by: Jean-Francois Moine Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c index db22e3c24764..068060231630 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");