summaryrefslogtreecommitdiff
path: root/drivers/media/common
diff options
context:
space:
mode:
authorAndrey Utkin <andrey.krieger.utkin@gmail.com>2014-07-17 13:27:16 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-07-21 19:31:58 -0300
commit7fcec4c14b15684b0853c9ebc4090c19adc9a1f6 (patch)
treeb2534340758b580d9cd27353eefb310f3ce4051b /drivers/media/common
parent632f2b0db9dabbaa5835b50a75a3a1639d6f6f38 (diff)
downloadlinux-next-7fcec4c14b15684b0853c9ebc4090c19adc9a1f6.tar.gz
[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>
Diffstat (limited to 'drivers/media/common')
0 files changed, 0 insertions, 0 deletions