Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e0527334 authored by David S. Miller's avatar David S. Miller
Browse files

infiniband: netlink: Move away from NLMSG_NEW().



And use nlmsg_data() while we're here too.

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 01f534d0
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -108,12 +108,14 @@ void *ibnl_put_msg(struct sk_buff *skb, struct nlmsghdr **nlh, int seq,
	unsigned char *prev_tail;

	prev_tail = skb_tail_pointer(skb);
	*nlh = NLMSG_NEW(skb, 0, seq, RDMA_NL_GET_TYPE(client, op),
	*nlh = nlmsg_put(skb, 0, seq, RDMA_NL_GET_TYPE(client, op),
			 len, NLM_F_MULTI);
	if (!*nlh)
		goto out_nlmsg_trim;
	(*nlh)->nlmsg_len = skb_tail_pointer(skb) - prev_tail;
	return NLMSG_DATA(*nlh);
	return nlmsg_data(*nlh);

nlmsg_failure:
out_nlmsg_trim:
	nlmsg_trim(skb, prev_tail);
	return NULL;
}