diff options
| author | Johan Hovold <johan@kernel.org> | 2021-05-24 13:09:19 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-07-20 16:22:40 +0200 |
| commit | ed0826d1d4bf75fa5d7734e2eb8029cdfd1913bb (patch) | |
| tree | 9e0e58899dc077fed6d41dc5e812ec34daf14556 /drivers/misc/ibmasm/module.c | |
| parent | d185f4ded92000fa47bc79a4682740893a851de3 (diff) | |
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: 6a7eba24e4f0 ("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>
Diffstat (limited to 'drivers/misc/ibmasm/module.c')
0 files changed, 0 insertions, 0 deletions
