Johan Hovold
ed0826d1d4
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-20 16:22:40 +02:00
..
2021-07-20 16:22:34 +02:00
2021-03-03 16:44:19 +01:00
2020-08-21 10:52:56 +02:00
2021-07-20 16:22:39 +02:00
2021-07-20 16:22:38 +02:00
2021-01-12 19:47:57 +01:00
2020-01-29 10:21:48 +01:00
2021-03-30 14:45:01 +02:00
2021-07-20 16:22:39 +02:00
2021-03-30 14:45:00 +02:00
2021-05-26 11:27:33 +02:00
2021-07-20 16:22:39 +02:00
2021-05-22 10:38:18 +02:00
2021-03-03 16:44:18 +01:00
2021-01-17 13:55:13 +01:00
2020-06-20 10:23:22 +02:00
2021-07-20 16:22:34 +02:00
2020-10-01 11:11:50 +02:00
2021-06-30 08:49:35 -04:00
2020-10-29 09:03:01 +01:00
2021-07-20 16:22:36 +02:00
2021-04-07 12:04:21 +02:00
2021-06-10 12:41:35 +02:00
2021-03-03 16:44:23 +01:00
2021-07-20 16:22:37 +02:00
2021-06-30 08:49:30 -04:00
2021-05-22 10:38:24 +02:00
2020-05-10 10:26:03 +02:00
2021-05-26 11:27:32 +02:00
2020-04-02 19:02:34 +02:00
2021-05-22 10:38:17 +02:00
2021-06-30 08:49:38 -04:00
2021-03-03 16:44:21 +01:00
2021-07-20 16:22:35 +02:00
2021-07-20 16:22:38 +02:00
2021-07-20 16:22:35 +02:00
2021-02-03 23:16:17 +01:00
2021-07-20 16:22:40 +02:00
2020-04-24 07:57:11 +02:00
2021-07-20 16:22:37 +02:00
2021-05-26 11:27:33 +02:00
2020-06-20 10:23:24 +02:00
2019-08-04 09:34:58 +02:00
2021-07-20 16:22:40 +02:00
2021-07-20 16:22:40 +02:00
2021-05-22 10:38:22 +02:00
2020-12-29 13:42:38 +01:00
2020-11-10 10:22:16 +01:00
2021-03-03 16:44:19 +01:00
2021-06-03 08:22:07 +02:00
2021-07-20 16:22:39 +02:00
2021-05-22 10:38:23 +02:00
2021-07-20 16:22:38 +02:00
2021-05-22 10:38:25 +02:00
2019-11-28 18:25:59 +01:00
2021-03-03 16:44:23 +01:00
2019-11-25 15:53:55 +01:00
2020-11-18 18:25:00 +01:00
2020-08-21 10:53:04 +02:00
2020-01-04 13:34:16 +01:00
2021-06-30 08:49:36 -04:00
2021-07-20 16:22:36 +02:00
2021-04-07 12:04:21 +02:00
2021-07-20 16:22:33 +02:00
2021-05-22 10:38:18 +02:00
2020-11-10 21:03:57 +01:00
2019-08-04 09:35:02 +02:00
2020-12-29 13:42:40 +01:00
2020-05-20 08:11:41 +02:00
2020-06-20 10:23:15 +02:00
2020-09-23 08:44:26 +02:00
2021-07-20 16:22:32 +02:00
2020-05-02 17:20:51 +02:00
2020-04-24 07:57:22 +02:00
2021-07-20 16:22:31 +02:00
2021-07-20 16:22:36 +02:00
2020-12-29 13:42:36 +01:00
2021-07-20 16:22:34 +02:00
2021-07-20 16:22:31 +02:00
2021-07-20 16:22:36 +02:00
2021-06-30 08:49:30 -04:00
2021-05-22 10:38:29 +02:00
2019-11-06 12:09:17 +01:00
2021-07-20 16:22:36 +02:00
2020-07-22 09:10:07 +02:00
2021-07-20 16:22:30 +02:00
2021-06-10 12:41:35 +02:00
2021-01-12 19:47:54 +01:00
2021-05-26 11:27:34 +02:00
2020-10-29 09:03:04 +01:00
2020-08-26 10:27:09 +02:00
2020-11-10 10:22:16 +01:00
2020-11-10 10:22:14 +01:00
2021-07-11 12:45:27 +02:00