Home
last modified time | relevance | path

Searched hist:cfca31ce (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/watchdog/
H A Dwm8350_wdt.ccfca31ce Thu May 27 07:32:24 CDT 2010 Julia Lawall <julia@diku.dk> [PATCH 2/11] drivers/watchdog: Eliminate a NULL pointer dereference

At the point of the call to dev_err, wm8350 is NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
... when != if (...) S1 else S2
when != E = E1
* E->f
... when any
return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
cfca31ce Thu May 27 07:32:24 CDT 2010 Julia Lawall <julia@diku.dk> [PATCH 2/11] drivers/watchdog: Eliminate a NULL pointer dereference

At the point of the call to dev_err, wm8350 is NULL.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@r exists@
expression E,E1;
identifier f;
statement S1,S2,S3;
@@

if ((E == NULL && ...) || ...)
{
... when != if (...) S1 else S2
when != E = E1
* E->f
... when any
return ...;
}
else S3
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>