diff options
Diffstat (limited to 'scripts/coccinelle/error_propagate_null.cocci')
-rw-r--r-- | scripts/coccinelle/error_propagate_null.cocci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/coccinelle/error_propagate_null.cocci b/scripts/coccinelle/error_propagate_null.cocci new file mode 100644 index 0000000000..c23638007a --- /dev/null +++ b/scripts/coccinelle/error_propagate_null.cocci @@ -0,0 +1,10 @@ +// error_propagate() already ignores local_err==NULL, so there's +// no need to check it before calling. + +@@ +identifier L; +expression E; +@@ +-if (L) { + error_propagate(E, L); +-} |