linux/drivers/media
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
..
cec media: cec: add support for 5V signal testing 2018-07-25 07:11:48 -04:00
common media: videobuf2-core: check for q->error in vb2_core_qbuf() 2018-07-24 17:51:39 -04:00
dvb-core media: mark entity-intf links as IMMUTABLE 2018-07-04 08:40:49 -04:00
dvb-frontends media: dvb: point to the location of the old README.dvb-usb file 2018-06-15 18:10:01 -03:00
firewire
i2c media: video-i2c: add hwmon support for amg88xx 2018-07-25 08:33:53 -04:00
mmc media: siano: use GFP_DMA only for smssdio 2018-05-15 08:04:42 -04:00
pci media: tw686x: Fix oops on buffer alloc failure 2018-07-25 08:34:28 -04:00
platform media: coda: add missing h.264 levels 2018-07-25 08:31:51 -04:00
radio media: v4l: fix broken video4linux docs locations 2018-06-15 18:10:01 -03:00
rc media: bpf: ensure bpf program is freed on detach 2018-07-13 11:07:29 -04:00
spi media: cxd2880-spi: Modified how to declare structure 2018-05-05 10:37:12 -04:00
tuners media: tuner-simple: allow setting mono radio mode 2018-07-04 09:49:27 -04:00
usb media: gspca_kinect: cast sizeof to int for comparison 2018-07-25 08:35:12 -04:00
v4l2-core media: v4l2-mem2mem: add v4l2_m2m_last_buf() 2018-07-25 08:10:31 -04:00
Kconfig media: cec: Kconfig coding style issue 2018-05-09 16:26:50 -04:00
Makefile
media-device.c media: add flags field to struct media_v2_entity 2018-07-25 07:46:24 -04:00
media-devnode.c MAINTAINERS & files: Canonize the e-mails I use at files 2018-05-04 06:21:06 -04:00
media-entity.c