Remove use of "int ret" when we already have errcode.