netlink: make nlmsg_end() and genlmsg_end() void
[deliverable/linux.git] / net / ieee802154 / netlink.c
index fa1464762d0dafdc481b68a7cbf46cfd45d8b30a..c8133c07ceee4ce29411a5f9ea47c0c529231223 100644 (file)
@@ -63,13 +63,9 @@ int ieee802154_nl_mcast(struct sk_buff *msg, unsigned int group)
        struct nlmsghdr *nlh = nlmsg_hdr(msg);
        void *hdr = genlmsg_data(nlmsg_data(nlh));
 
-       if (genlmsg_end(msg, hdr) < 0)
-               goto out;
+       genlmsg_end(msg, hdr);
 
        return genlmsg_multicast(&nl802154_family, msg, 0, group, GFP_ATOMIC);
-out:
-       nlmsg_free(msg);
-       return -ENOBUFS;
 }
 
 struct sk_buff *ieee802154_nl_new_reply(struct genl_info *info,
@@ -96,13 +92,9 @@ int ieee802154_nl_reply(struct sk_buff *msg, struct genl_info *info)
        struct nlmsghdr *nlh = nlmsg_hdr(msg);
        void *hdr = genlmsg_data(nlmsg_data(nlh));
 
-       if (genlmsg_end(msg, hdr) < 0)
-               goto out;
+       genlmsg_end(msg, hdr);
 
        return genlmsg_reply(msg, info);
-out:
-       nlmsg_free(msg);
-       return -ENOBUFS;
 }
 
 static const struct genl_ops ieee8021154_ops[] = {
This page took 0.02554 seconds and 5 git commands to generate.