db: make a file kernel.return_fixes for updating return values
One issue that we have a lot is that Smatch can't determine the return
value. There are several reasons for this, one is that it's sometimes
just complicated to parse the code. Another is that maybe we have a
function that always returns zero but we want to handle future errors. In
the kernel, normally functions return negative errors but callers normally
do:
ret = func();
if (ret)
return ret;
So Smatch assumes that errors will be anything non-zero. And then down
the line, you have one caller which does "if (ret < 0) {" so Smatch gets
confused.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>