diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-05 20:04:39 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-06 15:44:47 +0200 |
commit | 057af70713445fad2459aa348c9c2c4ecf7db938 (patch) | |
tree | ba8d367a7c7ae4e0555616c8bc477e33ed682ac4 /net/tipc/socket.c | |
parent | net: nfc: have genetlink code to parse the attrs during dumpit (diff) | |
download | linux-057af70713445fad2459aa348c9c2c4ecf7db938.tar.xz linux-057af70713445fad2459aa348c9c2c4ecf7db938.zip |
net: tipc: have genetlink code to parse the attrs during dumpit
Benefit from the fact that the generic netlink code can parse the attrs
for dumpit op and avoid need to parse it in the op callback.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r-- | net/tipc/socket.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 3b9f8cc328f5..d579b64705b1 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -3588,13 +3588,9 @@ int tipc_nl_publ_dump(struct sk_buff *skb, struct netlink_callback *cb) struct tipc_sock *tsk; if (!tsk_portid) { - struct nlattr **attrs; + struct nlattr **attrs = genl_dumpit_info(cb)->attrs; struct nlattr *sock[TIPC_NLA_SOCK_MAX + 1]; - err = tipc_nlmsg_parse(cb->nlh, &attrs); - if (err) - return err; - if (!attrs[TIPC_NLA_SOCK]) return -EINVAL; |