Julien Brunel cf7b9a1e11 drivers/video: bad error test before a dereference
The error test that follows the call to backlight_device_register semms
not to concern the right variable.

A simplified version of the semantic match that finds this problem is
as follows:
(http://www.emn.fr/x-info/coccinelle/)
// <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;
identifier fld;
position def0.p0;
position p != protected.p;
@@
x@p0
... when != x = E
* x@p->fld
// </smpl>

Signed-off-by: Julien Brunel <brunel@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-11-19 18:49:57 -08:00
..
2008-10-28 17:46:02 +09:00
2008-11-07 08:25:43 -08:00
2008-11-14 14:10:01 +01:00
2008-11-13 15:37:07 +09:00
2008-11-01 09:49:46 -07:00
2008-11-01 09:50:12 -07:00
2008-10-21 07:48:33 -04:00
2008-11-15 11:36:06 -08:00
2008-10-16 11:21:30 -07:00
2008-10-27 19:15:41 +01:00
2008-11-11 13:33:05 -08:00
2008-11-04 08:18:19 -08:00
2008-11-04 08:18:19 -08:00
2008-11-10 13:50:17 -08:00
2008-11-01 09:49:46 -07:00
2008-11-13 14:45:06 -08:00
2008-11-04 08:18:19 -08:00
2008-10-28 21:47:17 +00:00