diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-06-21 17:57:59 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-06-26 12:48:00 +0200 |
commit | cb6ec182c13fc87a6562d47f18721dbd702adb52 (patch) | |
tree | ebc9c1794ea2d12153d1153242a458ebc3794cf9 /drivers/video/hdmi.c | |
parent | Linux 3.16-rc2 (diff) | |
download | linux-cb6ec182c13fc87a6562d47f18721dbd702adb52.tar.xz linux-cb6ec182c13fc87a6562d47f18721dbd702adb52.zip |
drivers/video/fbdev : dereference without an error test
After a variable is assigned the result of backlight_device_register, an
error test should be performed before a dereference.
A simplified version of the semantic match that finds this problem is
as follows:
// <smpl>
@def0@
expression x;
position p0;
@@
x@p0 = backlight_device_register(...)
@protected@
expression def0.x,E;
position def0.p0;
position p;
statement S;
@@
x@p0
... when != x = E
if (!IS_ERR(x) && ...) {<... x@p ...>} else S
@unprotected@
expression def0.x,E;
identifier fld;
position def0.p0;
position p != protected.p;
@@
x@p0
... when != x = E
* x@p->fld
// </smpl>
Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/hdmi.c')
0 files changed, 0 insertions, 0 deletions