Skip to content
Commit cfca31ce authored by Julia Lawall's avatar Julia Lawall Committed by Wim Van Sebroeck
Browse files

[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: default avatarJulia Lawall <julia@diku.dk>
Acked-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
parent 386f40c8
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment