retval doesn't initalized

If each if conditions are all fail, variable retval will under uninitlized