db/kernel.return_fixes: specify some functions that return negative errors