diff options
author | Himangi Saraogi <himangi774@gmail.com> | 2014-06-21 21:27:59 +0530 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2014-06-26 13:48:00 +0300 |
commit | cb6ec182c13fc87a6562d47f18721dbd702adb52 (patch) | |
tree | ebc9c1794ea2d12153d1153242a458ebc3794cf9 /drivers/video/fbdev/omap2/dss/dispc.c | |
parent | a497c3ba1d97fc69c1e78e7b96435ba8c2cb42ee (diff) |
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/fbdev/omap2/dss/dispc.c')
0 files changed, 0 insertions, 0 deletions