To avoid confusion with locks remove the check on error_code that should
always be set to SLURM_SUCCESS since it isn't used before.
fix typo