add return info for all cases

the same as #1138, for master branch.