delete the check_redundant_null_check.c
commit0975c54583c43043fa87854ee1c54d3985895ce3
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 24 Nov 2014 08:52:46 +0000 (24 11:52 +0300)
committerDan Carpenter <dan.carpenter@oracle.com>
Mon, 24 Nov 2014 08:52:46 +0000 (24 11:52 +0300)
tree4f54a34b93703b0f8afa2e61eb766c6d4f651e74
parenta8d29e1de16fbe7612a0ecf0a9c31c54e3ece034
delete the check_redundant_null_check.c

My thinking on this has evolved and I now feel that NULL checks can make
the code more readable.

Generally when you see a:

if (foo)
kfree(foo);

That is a sign of bad code.  Generally it is cause by "One Err" style error
handling where you do.

foo = alloc();
if (!foo)
goto out;
bar = alloc();
if (!bar)
goto out;

out:
if (foo)
kfree(foo);

This kind of error handling tends to have bugs, but the fix isn't to
remove the if statements, it's to unwind properly so that we know at every
line if foo is valid or not.

Also, I wrote this code a long time ago and at the time I thought it was
a clever hack but really I want to focus on bugs instead of style issues.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
check_list.h
check_redundant_null_check.c [deleted file]