summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMathias Krause <minipli@googlemail.com>2013-09-30 22:03:08 +0200
committerDavid S. Miller <davem@davemloft.net>2013-10-02 16:03:50 -0400
commitac73bf50b709dea4e39635151b861b8a8f52bfbb (patch)
treef63b489a95edfd71781772370511fe16bb398fb0 /drivers
parent162b2bedc084d2d908a04c93383ba02348b648b0 (diff)
downloadlinux-ac73bf50b709dea4e39635151b861b8a8f52bfbb.tar.gz
linux-ac73bf50b709dea4e39635151b861b8a8f52bfbb.tar.bz2
linux-ac73bf50b709dea4e39635151b861b8a8f52bfbb.zip
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')
-rw-r--r--drivers/connector/connector.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 0daa11e418b1..a36749f1e44a 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;