linux/drivers/staging/media
Andrey Utkin 7fcec4c14b [media] staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check
[linux-3.16-rc5/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:210]:
(style) Checking if unsigned variable 'val' is less than zero.

    val = get_oneshot_mode(ipipeif->input);
    if (val < 0) {
        pr_err("ipipeif: links setup required");
        return -EINVAL;
    }

but

static int get_oneshot_mode(enum ipipeif_input_entity input)

Introduced temporary variable for negativity check.
"val" is afterwards used in a lot of bitwise operations, so changing its type
to signed is not safe, according to CERT C Secure Coding Standards chapter
INT13-C: "Use bitwise operators only on unsigned operands"
https://www.securecoding.cert.org/confluence/display/seccode/INT13-C.+Use+bitwise+operators+only+on+unsigned+operands

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80521

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-07-21 19:31:58 -03:00
..
as102 [media] USB: as102_usb_drv.c: Remove useless return variables 2014-05-25 17:39:19 -03:00
bcm2048 [media] radio-bcm2048.c: Fix some checkpatch.pl errors 2014-07-17 20:07:05 -03:00
cxd2099 Staging: media/cxd2099: Fix line length over 80 characters 2014-03-07 13:14:14 -08:00
davinci_vpfe [media] staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check 2014-07-21 19:31:58 -03:00
dt3155v4l [media] Staging: dt3155v4l: set error code on failure 2014-05-23 19:48:28 -03:00
go7007 [media] go7007: add motion detection support 2014-07-17 11:57:32 -03:00
lirc USB driver patches for 3.16-rc1 2014-06-03 09:11:20 -07:00
msi3101 [media] v4l2-ctrls: increase internal min/max/step/def to 64 bit 2014-07-17 09:18:09 -03:00
omap4iss [media] v4l: omap4iss: Signal fatal errors to the vb2 queue 2014-07-17 16:22:41 -03:00
omap24xx [media] staging: media: omap24xx: use pr_info() instead of KERN_INFO 2014-05-23 12:54:53 -03:00
rtl2832u_sdr [media] v4l2-ctrls: increase internal min/max/step/def to 64 bit 2014-07-17 09:18:09 -03:00
solo6x10 [media] solo6x10: update GOP size, QP immediately 2014-07-17 20:04:40 -03:00
Kconfig [media] sn9c102: remove deprecated driver 2014-07-04 16:10:57 -03:00
Makefile [media] sn9c102: remove deprecated driver 2014-07-04 16:10:57 -03:00