No defect in the order of commitment under which a person convicted of crime is held by the warden of any correctional institution or the secretary of corrections shall be held a ground of action against the warden or the secretary of corrections for false imprisonment, and no such action shall be maintained in the courts, provided it shall appear that the warden or the secretary of corrections attempted to faithfully carry out the judgment of the court making such order.