retval doesn't initalized

If each if conditions are all fail, variable retval will under uninitlized
Merge pull request #933 from RockLi/unstable

retval doesn't initalized