diff options
author | Mathias Krause <minipli@googlemail.com> | 2013-09-30 20:03:08 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-10-02 20:03:50 (GMT) |
commit | ac73bf50b709dea4e39635151b861b8a8f52bfbb (patch) | |
tree | f63b489a95edfd71781772370511fe16bb398fb0 /drivers/connector/connector.c | |
parent | 162b2bedc084d2d908a04c93383ba02348b648b0 (diff) | |
download | linux-ac73bf50b709dea4e39635151b861b8a8f52bfbb.tar.xz |
connector: use 'size' everywhere in cn_netlink_send()
We calculated the size for the netlink message buffer as size. Use size
in the memcpy() call as well instead of recalculating it.
Signed-off-by: Mathias Krause <minipli@googlemail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/connector/connector.c')
-rw-r--r-- | drivers/connector/connector.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c index 0daa11e..a36749f 100644 --- a/drivers/connector/connector.c +++ b/drivers/connector/connector.c @@ -109,7 +109,7 @@ int cn_netlink_send(struct cn_msg *msg, u32 __group, gfp_t gfp_mask) data = nlmsg_data(nlh); - memcpy(data, msg, sizeof(*data) + msg->len); + memcpy(data, msg, size); NETLINK_CB(skb).dst_group = group; |