linux-brain/drivers/media/usb/gspca
Johan Hovold 5d2a52732e media: gspca/sunplus: fix zero-length control requests
commit b4bb4d425b7b02424afea2dfdcd77b3b4794175e upstream.

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 single zero-length control request which was using the
read-register helper, and update the helper so that zero-length reads
fail with an error message instead.

Fixes: 6a7eba24e4 ("V4L/DVB (8157): gspca: all subdrivers")
Cc: stable@vger.kernel.org      # 2.6.27
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-19 08:53:18 +02:00
..
gl860 media: gspca/gl860: fix zero-length control requests 2021-07-14 16:53:22 +02:00
m5602 media: gspca: properly check for errors in po1030_probe() 2021-06-03 08:59:11 +02:00
stv06xx media: gscpa/stv06xx: fix memory leak 2021-05-11 14:04:11 +02:00
Kconfig
Makefile
autogain_functions.c
benq.c
conex.c
cpia1.c Revert "media: usb: gspca: add a missed check for goto_low_power" 2021-06-03 08:59:08 +02:00
dtcs033.c
etoms.c
finepix.c
gspca.c media: gscpa/stv06xx: fix memory leak 2021-05-11 14:04:11 +02:00
gspca.h media: gscpa/stv06xx: fix memory leak 2021-05-11 14:04:11 +02:00
jeilinj.c
jl2005bcd.c
jpeg.h
kinect.c
konica.c
mars.c
mr97310a.c
nw80x.c
ov519.c media: ov519: add missing endpoint sanity checks 2020-04-01 11:02:17 +02:00
ov534.c
ov534_9.c
pac207.c
pac7302.c
pac7311.c
pac_common.h
se401.c
se401.h
sn9c20x.c
sn9c2028.c
sn9c2028.h
sonixb.c
sonixj.c
spca500.c
spca501.c
spca505.c
spca506.c
spca508.c
spca561.c
spca1528.c
sq905.c media: gspca/sq905: fix control-request direction 2021-07-19 08:53:18 +02:00
sq905c.c
sq930x.c
stk014.c
stk1135.c
stk1135.h
stv0680.c
sunplus.c media: gspca/sunplus: fix zero-length control requests 2021-07-19 08:53:18 +02:00
t613.c
topro.c
touptek.c
tv8532.c
vc032x.c
vicam.c
w996Xcf.c
xirlink_cit.c media: xirlink_cit: add missing descriptor sanity checks 2020-04-01 11:02:18 +02:00
zc3xx-reg.h
zc3xx.c