TS-2883: Initialize ret value to error condition