it to NULL in the called function does not set it to NULL in the caller.
Actually, the callers of these functions do not do anything with the
special error handling, so drop the unused checks and the NULL assignments
altogether.
Found by the lgtm bot.