]> git.baikalelectronics.ru Git - kernel.git/commit
V4L/DVB: drivers/media: Correct NULL test
authorJulia Lawall <julia@diku.dk>
Sat, 6 Feb 2010 08:43:58 +0000 (05:43 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:57 +0000 (15:10 -0300)
commitdbbb7c889f5f28593f371d3389144a01691d7a70
tree6f46610dcccc749ab3c08a09e6c74d64811c5935
parentc4e85dd1d372437b48d15c04dc13673fc76fb9fa
V4L/DVB: drivers/media: Correct NULL test

In each case, the NULL test has been performed already.

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

// <smpl>
@r@
expression *x;
expression e;
identifier l;
@@

if (x == NULL || ...) {
    ... when forall
    return ...; }
... when != goto l;
    when != x = e
    when != &x
*x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/frontends/stv0900_core.c
drivers/media/video/cpia.c