As I think, retcode is used to determine is everything OK, or it's not. If just one state call fails, it is enough to say that something goes bad and retcode will not be 0. But if every state call was good, retcode will be 0.