linux/drivers/media/usb/gspca/gl860
Johan Hovold 8ed339f23d media: gspca/gl860: fix zero-length control requests
The direction of the pipe argument must match the request-type direction
bit or control requests may fail depending on the host-controller-driver
implementation.

Control transfers without a data stage are treated as OUT requests by
the USB stack and should be using usb_sndctrlpipe(). Failing to do so
will now trigger a warning.

Fix the gl860_RTx() helper so that zero-length control reads fail with
an error message instead. Note that there are no current callers that
would trigger this.

Fixes: 4f7cb8837c ("V4L/DVB (12954): gspca - gl860: Addition of GL860 based webcams")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-02 14:14:16 +02:00
..
gl860-mi1320.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 65 2019-05-24 17:36:46 +02:00
gl860-mi2020.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 65 2019-05-24 17:36:46 +02:00
gl860-ov2640.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 65 2019-05-24 17:36:46 +02:00
gl860-ov9655.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 65 2019-05-24 17:36:46 +02:00
gl860.c media: gspca/gl860: fix zero-length control requests 2021-06-02 14:14:16 +02:00
gl860.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 65 2019-05-24 17:36:46 +02:00
Kconfig treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00