implied: db: fix how returns are broken apart
This function is used in db to process code like this:
err = some_func();
if (err)
goto err_out;
...
err = some_other_func();
if (err)
goto err_out;
return 0;
err_out:
cleanup();
return err;
At the end, "err" could be a bunch of different error code. If we treat it
like one thing then we could lose information compared to the code returned
directly after each failure.
So what we do is we look at all the sources of "err" where "err" came from.
We take the implications of each error return.
This function is looking at the implications to see which of the old states
have been changed. It checks the wrong variable so it says none of the
states have been modified. So each return is like a direct return without
any additional clean up work being done.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>