qemuimage-testlib: Fix IP address handling

Remove some pointless code and also fix the return handling
for the function since it returns null, not 0 as the comments
would suggest.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>