media: gspca: do not resubmit URBs when streaming has stopped
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Tue, 26 Feb 2019 12:54:22 +0000 (07:54 -0500)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 19 Mar 2019 18:02:23 +0000 (14:02 -0400)
commite6f8bd59c28f758feea403a70d6c3ef28c50959f
treef529268d719aada0c2856e1847d6d3303864ddec
parentf712e5358d430fe9a7d7d4848f7dbff84b47de3a
media: gspca: do not resubmit URBs when streaming has stopped

When streaming is stopped all URBs are killed, but in fill_frame and in
bulk_irq this results in an attempt to resubmit the killed URB. That is
not what you want and causes spurious kernel messages.

So check if streaming has stopped before resubmitting.

Also check against gspca_dev->streaming rather than vb2_start_streaming_called()
since vb2_start_streaming_called() will return true when in stop_streaming,
but gspca_dev->streaming is set to false when stop_streaming is called.

Fixes: 6992effe5344 ("gspca: Kill all URBs before releasing any of them")

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/gspca/gspca.c