linux_dsm_epyc7002/drivers/media/usb/gspca
Julia Lawall 2e3134caf6 media: gspca_kinect: cast sizeof to int for comparison
Comparing an int to a size, which is unsigned, causes the int to become
unsigned, giving the wrong result.  kinect_read returns the result of
usb_control_msg, which can return a negtive error code.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
int x;
expression e,e1;
identifier f;
@@

*x = f(...);
... when != x = e1
    when != if (x < 0 || ...) { ... return ...; }
*x < sizeof(e)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
2018-07-25 08:35:12 -04:00
..
gl860 media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
m5602 media: v4l: fix broken video4linux docs locations 2018-06-15 18:10:01 -03:00
stv06xx media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
autogain_functions.c media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
benq.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
conex.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
cpia1.c media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
dtcs033.c media: gspca: dtcs033: use %*ph to print small buffer 2018-02-26 08:14:47 -05:00
etoms.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
finepix.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
gspca.c media: gspca: Kill all URBs before releasing any of them 2018-05-28 16:05:03 -04:00
gspca.h media: gspca: convert to vb2 2018-05-28 15:57:17 -04:00
jeilinj.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
jl2005bcd.c media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers 2018-05-05 11:42:43 -04:00
jpeg.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
Kconfig media: gspca: convert to vb2 2018-05-28 15:57:17 -04:00
kinect.c media: gspca_kinect: cast sizeof to int for comparison 2018-07-25 08:35:12 -04:00
konica.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
mars.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
mr97310a.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
nw80x.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
ov519.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
ov534_9.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
ov534.c media: gspca: fix g/s_parm handling 2018-05-28 16:02:45 -04:00
pac207.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
pac7302.c media: gspca: Convert PERR to gspca_err 2017-12-08 10:08:50 -05:00
pac7311.c media: gspca: Convert PERR to gspca_err 2017-12-08 10:08:50 -05:00
pac_common.h media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
se401.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
se401.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
sn9c20x.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
sn9c2028.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
sn9c2028.h media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
sonixb.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
sonixj.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca500.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca501.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca505.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca506.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca508.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca561.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
spca1528.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
sq905.c media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers 2018-05-05 11:42:43 -04:00
sq905c.c media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers 2018-05-05 11:42:43 -04:00
sq930x.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
stk014.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
stk1135.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
stk1135.h [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
stv0680.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
sunplus.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
t613.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
topro.c media: gspca: fix g/s_parm handling 2018-05-28 16:02:45 -04:00
touptek.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
tv8532.c [media] media: Drop FSF's postal address from the source code files 2017-01-27 11:38:09 -02:00
vc032x.c media: gspca: convert to vb2 2018-05-28 15:57:17 -04:00
vicam.c media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers 2018-05-05 11:42:43 -04:00
w996Xcf.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
xirlink_cit.c media: gspca: Convert PDEBUG to gspca_dbg 2017-12-08 10:10:15 -05:00
zc3xx-reg.h MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
zc3xx.c media: gspca_zc3xx: Enable short exposure times for OV7648 2018-05-28 16:35:41 -04:00