init: set errno if init has been failed.