Coccinelle: Add null/kmerr.cocci
authorNicolas Palix <npalix@diku.dk>
Tue, 24 Aug 2010 15:38:56 +0000 (17:38 +0200)
committerMichal Marek <mmarek@suse.cz>
Tue, 31 Aug 2010 09:37:53 +0000 (11:37 +0200)
commit2e1e1605fc60b3fcf1e9382729a92fc305727952
treedc61f821f1658a58646a35f78cc2334f1db8800e
parentc75b81bffa0a9493a24ae61d0c52f85e4043c183
Coccinelle: Add null/kmerr.cocci

This semantic patch looks for kmalloc etc that are not followed by a
NULL check.  It only gives a report in the case where there is some
error handling code later in the function, which may be helpful
in determining what the error handling code for the call to kmalloc etc
should be.

Signed-off-by: Nicolas Palix <npalix@diku.dk>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/coccinelle/null/kmerr.cocci [new file with mode: 0644]