From: Julia Lawall Date: Thu, 27 May 2010 16:10:08 +0000 (+0200) Subject: USB: host: Eliminate NULL dereference X-Git-Tag: v2.6.36-rc1~293^2~131 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc6eb27bdd3d214568f7d77a317c202c10222511;p=pandora-kernel.git USB: host: Eliminate NULL dereference The test above allows std to be NULL, so check that std is not NULL before doing the dereference. 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 } else S3 // Signed-off-by: Julia Lawall Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed