Change socket_init() to also return an 'error' code.

In this case is simply the return value of socket() call.

Signed-off-by: Thiago Farina <tfarina@chromium.org>