The error means that it should return a value but doesn't. The statement you need is "return <something>;" (not literally, of course, you have to replace <something> with something appropriate).

getData calls itself, is that really what you want (recursion)? Recursion is not the same as returning to the top of the function. What do you want getData to do, and how do you want it to use the choice parameter?