From: Julia Lawall Date: Thu, 27 May 2010 12:32:24 +0000 (+0200) Subject: [PATCH 2/11] drivers/watchdog: Eliminate a NULL pointer dereference X-Git-Tag: v2.6.35-rc3~31 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cfca31ce789963c0dd6ca2e9cc13b90cc2802fbd;p=pandora-kernel.git [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/) // @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 // Signed-off-by: Julia Lawall Acked-by: Mark Brown Signed-off-by: Wim Van Sebroeck --- Reading git-diff-tree failed