]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 31 May 2019 13:43:53 +0000 (06:43 -0700)
commit6fb2ea5513053553956fd677b4a4265cba25f173
treea64a8b21473da5d8143132c216761b966d99780e
parentfc816cea8c5b24d8953578c6d83e44aee320d0b6
media: gspca: do not resubmit URBs when streaming has stopped

[ Upstream commit e6f8bd59c28f758feea403a70d6c3ef28c50959f ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/media/usb/gspca/gspca.c