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-07-24 10:47:40 -07:00
2008-10-16 11:21:45 -07:00
2008-03-10 18:01:20 -07:00
2008-04-28 08:58:38 -07:00
2008-07-24 10:47:37 -07:00
2008-10-30 11:38:45 -07:00
2008-07-24 10:47:40 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-05-04 17:59:05 -07:00
2007-10-18 14:37:17 -07:00
2008-07-20 17:24:39 -07:00
2008-07-24 10:47:34 -07:00
2008-11-01 12:40:38 -07:00
2008-02-03 17:31:49 +02:00
2008-05-18 13:28:49 -07:00
2008-11-06 15:41:19 -08:00
2007-05-08 11:15:26 -07:00
2008-07-30 09:41:47 -07:00
2008-04-28 08:58:35 -07:00
2008-02-06 10:41:16 -08:00
2008-07-26 12:00:12 -07:00
2008-06-06 11:29:12 -07:00
2008-04-28 08:58:41 -07:00
2008-10-16 11:21:42 -07:00
2007-10-16 09:43:20 -07:00
2008-07-24 10:47:37 -07:00
2008-07-26 12:00:12 -07:00
2007-10-16 09:43:22 -07:00
2008-10-16 11:21:42 -07:00
2007-05-08 11:15:32 -07:00
2008-07-04 10:40:08 -07:00