net: Remove the err argument from sock_from_file
authorFlorent Revest <revest@chromium.org>
Fri, 4 Dec 2020 11:36:04 +0000 (12:36 +0100)
committerDaniel Borkmann <daniel@iogearbox.net>
Fri, 4 Dec 2020 21:32:40 +0000 (22:32 +0100)
commitdba4a9256bb4d78ef89aaad5f49787aa27fcd5b4
tree21572e1bceac8fd13f1c8a190b65316c8c1e8a66
parent5c667dca71095abec90420eb09503f35f66c9585
net: Remove the err argument from sock_from_file

Currently, the sock_from_file prototype takes an "err" pointer that is
either not set or set to -ENOTSOCK IFF the returned socket is NULL. This
makes the error redundant and it is ignored by a few callers.

This patch simplifies the API by letting callers deduce the error based
on whether the returned socket is NULL or not.

Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Florent Revest <revest@google.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Reviewed-by: KP Singh <kpsingh@google.com>
Link: https://lore.kernel.org/bpf/20201204113609.1850150-1-revest@google.com
fs/eventpoll.c
fs/io_uring.c
include/linux/net.h
net/core/netclassid_cgroup.c
net/core/netprio_cgroup.c
net/core/sock.c
net/socket.c