net: socket: remove net_init_socket()
commitb6aeee02980e193f744f74c48fd900940feb2799
authorLaurent Vivier <lvivier@redhat.com>
Fri, 9 Jun 2023 07:27:48 +0000 (9 09:27 +0200)
committerJason Wang <jasowang@redhat.com>
Fri, 7 Jul 2023 08:35:12 +0000 (7 16:35 +0800)
tree97e91d2abae35fe6176c8c9a977da985d1a2fa60
parent23455ae341656ca867ee4a171826b9d280d6acb5
net: socket: remove net_init_socket()

Move the file descriptor type checking before doing anything with it.
If it's not usable, don't close it as it could be in use by another
part of QEMU, only fail and report an error.

Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Laurent Vivier <lvivier@redhat.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
net/socket.c