linux/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
m5602 media: v4l: fix broken video4linux docs locations 2018-06-15 18:10:01 -03:00
stv06xx
autogain_functions.c
benq.c
conex.c
cpia1.c
dtcs033.c
etoms.c
finepix.c
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
jl2005bcd.c media: gspca: Stop using GFP_DMA for buffers for USB bulk transfers 2018-05-05 11:42:43 -04:00
jpeg.h
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
Makefile
mars.c
mr97310a.c
nw80x.c
ov519.c
ov534_9.c
ov534.c media: gspca: fix g/s_parm handling 2018-05-28 16:02:45 -04:00
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: 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
stk014.c
stk1135.c
stk1135.h
stv0680.c
sunplus.c
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
tv8532.c
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
xirlink_cit.c
zc3xx-reg.h
zc3xx.c media: gspca_zc3xx: Enable short exposure times for OV7648 2018-05-28 16:35:41 -04:00