aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/diag.c
diff options
context:
space:
mode:
authorYajun Deng <[email protected]>2021-07-13 02:48:24 +0000
committerDavid S. Miller <[email protected]>2021-07-13 16:28:29 +0000
commit01757f536ac825e3614d583fee9acb48c64ed084 (patch)
tree0b31ad3ca2f4175b3c113a74c645a9cf28881548 /net/unix/diag.c
parentocteontx2-pf: Fix uninitialized boolean variable pps (diff)
downloadkernel-01757f536ac825e3614d583fee9acb48c64ed084.tar.gz
kernel-01757f536ac825e3614d583fee9acb48c64ed084.zip
net: Use nlmsg_unicast() instead of netlink_unicast()
It has 'if (err >0 )' statement in nlmsg_unicast(), so use nlmsg_unicast() instead of netlink_unicast(), this looks more concise. v2: remove the change in netfilter. Signed-off-by: Yajun Deng <[email protected]> Reviewed-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/unix/diag.c')
-rw-r--r--net/unix/diag.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/net/unix/diag.c b/net/unix/diag.c
index 9ff64f9df1f3..7e7d7f45685a 100644
--- a/net/unix/diag.c
+++ b/net/unix/diag.c
@@ -295,10 +295,8 @@ again:
goto again;
}
- err = netlink_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid,
- MSG_DONTWAIT);
- if (err > 0)
- err = 0;
+ err = nlmsg_unicast(net->diag_nlsk, rep, NETLINK_CB(in_skb).portid);
+
out:
if (sk)
sock_put(sk);