From: Julia Lawall Date: Fri, 28 Oct 2011 22:58:17 +0000 (-0300) Subject: [media] drivers/media/video/davinci/vpbe_display.c: eliminate a null pointer dereference X-Git-Tag: v3.3-rc1~48^2~635 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=49a0513c1fca2c43b14416f3f40220fa01ab5e39;p=pandora-kernel.git [media] drivers/media/video/davinci/vpbe_display.c: eliminate a null pointer dereference In the original code, probe_out could be reached when res was null and then when the irq had not yet been requested. In those cases, the call to free_irq is not needed, so move probe_out down and introduce a new label for the case where calling free_irq is useful. The semantic match that finds this problem is as follows: // @r@ expression E, E1; identifier f; statement S1,S2,S3; @@ if (E == NULL) { ... when != if (E == NULL || ...) S1 else S2 when != E = E1 *E->f ... when any return ...; } else S3 // Signed-off-by: Julia Lawall Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed