[NETLINK]: Directly return -EINTR from netlink_dump_start()
Now that all users of netlink_dump_start() use netlink_run_queue()
to process the receive queue, it is possible to return -EINTR from
netlink_dump_start() directly, therefore simplying the callers.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c
index 7dd97c5..0148f0e 100644
--- a/net/ipv4/inet_diag.c
+++ b/net/ipv4/inet_diag.c
@@ -818,8 +818,6 @@
return -ENOENT;
if (nlh->nlmsg_flags & NLM_F_DUMP) {
- int err;
-
if (nlmsg_attrlen(nlh, hdrlen)) {
struct nlattr *attr;
@@ -831,11 +829,8 @@
return -EINVAL;
}
- err = netlink_dump_start(idiagnl, skb, nlh,
- inet_diag_dump, NULL);
- if (err == 0)
- err = -EINTR;
- return err;
+ return netlink_dump_start(idiagnl, skb, nlh,
+ inet_diag_dump, NULL);
}
return inet_diag_get_exact(skb, nlh);