storage: fix error code paths return values