db: print return_states information in a more detailed way
The return_states works ok already if you a lot of split out returns:
if (x > 100)
return -EINVAL;
p = kmalloc();
if (!p)
return -ENOMEM;
But where it breaks down is if you have a bunch of places which do:
ret = some_func();
if (ret)
goto out;
p = kmalloc();
if (!p) {
ret = -ENOMEM;
goto out;
}
Because at the end there is just one return path for success and failure
and everything is jumbled together. This patch separates the return
values apart.
Also it handles the condition where we do:
return x >= 0 && x < 100;
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>