double_checking: complete re-write
What this check does is it prints a warning when you have:
if (ret) {
if (ret) {
The re-written code is much better than before but it's still not good.
The main problem is just bugs, but the other problem is that Smatch is too
clever about say, "well *actually* if you look at x variable and y variable
it means that foo can't be non-zero so there is no need to check." And
sometimes Smatch is wrong and sometimes Smatch is right but the code is
so complicated and an extra check is harmless so maybe we want it there.
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>