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

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

gdm72xx: Move away from NLMSG_PUT().



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

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8786395c
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -127,8 +127,12 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
	}

	seq++;
	nlh = NLMSG_PUT(skb, 0, seq, type, len);
	memcpy(NLMSG_DATA(nlh), msg, len);
	nlh = nlmsg_put(skb, 0, seq, type, len, 0);
	if (!nlh) {
		kfree_skb(skb);
		return -EMSGSIZE;
	}
	memcpy(nlmsg_data(nlh), msg, len);

	NETLINK_CB(skb).pid = 0;
	NETLINK_CB(skb).dst_group = 0;
@@ -144,7 +148,5 @@ int netlink_send(struct sock *sock, int group, u16 type, void *msg, int len)
		}
		ret = 0;
	}

nlmsg_failure:
	return ret;
}