https://github.com/torvalds/linux
Revision 734c2992828c66cee3feb21ecd30a6ac44aecc51 authored by Julia Lawall on 06 February 2010, 08:43:41 UTC, committed by Dan Williams on 10 February 2010, 19:07:28 UTC
cohd_fin has already been verified not to be NULL, so the argument to
BUG_ON cannot be true.

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>
Acked-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent 8f98781
History
Tip revision: 734c2992828c66cee3feb21ecd30a6ac44aecc51 authored by Julia Lawall on 06 February 2010, 08:43:41 UTC
drivers/dma: Correct NULL test
Tip revision: 734c299
File Mode Size
Kconfig -rw-r--r-- 39.8 KB
Makefile -rw-r--r-- 1.0 KB
calibrate.c -rw-r--r-- 5.1 KB
do_mounts.c -rw-r--r-- 9.3 KB
do_mounts.h -rw-r--r-- 1.4 KB
do_mounts_initrd.c -rw-r--r-- 3.2 KB
do_mounts_md.c -rw-r--r-- 7.9 KB
do_mounts_rd.c -rw-r--r-- 8.0 KB
initramfs.c -rw-r--r-- 12.6 KB
main.c -rw-r--r-- 21.1 KB
noinitramfs.c -rw-r--r-- 1.4 KB
version.c -rw-r--r-- 1.1 KB

back to top