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
Documentation
arch
block
crypto
drivers
firmware
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.gitignore -rw-r--r-- 843 bytes
.mailmap -rw-r--r-- 3.9 KB
COPYING -rw-r--r-- 18.3 KB
CREDITS -rw-r--r-- 91.8 KB
Kbuild -rw-r--r-- 2.4 KB
MAINTAINERS -rw-r--r-- 160.2 KB
Makefile -rw-r--r-- 52.0 KB
README -rw-r--r-- 17.0 KB
REPORTING-BUGS -rw-r--r-- 3.3 KB

README

back to top