Merge branch 'for-linus-v3.20' of git://git.infradead.org/linux-ubifs
[firefly-linux-kernel-4.4.55.git] / net / netfilter / nf_tables_api.c
index 1ff04bcd487154ecea5b6fc4514b799f162eeddb..199fd0f27b0e128cfb8674ca331c2dae240e1b1c 100644 (file)
@@ -427,7 +427,8 @@ static int nf_tables_fill_table_info(struct sk_buff *skb, struct net *net,
            nla_put_be32(skb, NFTA_TABLE_USE, htonl(table->use)))
                goto nla_put_failure;
 
-       return nlmsg_end(skb, nlh);
+       nlmsg_end(skb, nlh);
+       return 0;
 
 nla_put_failure:
        nlmsg_trim(skb, nlh);
@@ -971,7 +972,8 @@ static int nf_tables_fill_chain_info(struct sk_buff *skb, struct net *net,
        if (nla_put_be32(skb, NFTA_CHAIN_USE, htonl(chain->use)))
                goto nla_put_failure;
 
-       return nlmsg_end(skb, nlh);
+       nlmsg_end(skb, nlh);
+       return 0;
 
 nla_put_failure:
        nlmsg_trim(skb, nlh);
@@ -1713,7 +1715,8 @@ static int nf_tables_fill_rule_info(struct sk_buff *skb, struct net *net,
            nla_put(skb, NFTA_RULE_USERDATA, rule->ulen, nft_userdata(rule)))
                goto nla_put_failure;
 
-       return nlmsg_end(skb, nlh);
+       nlmsg_end(skb, nlh);
+       return 0;
 
 nla_put_failure:
        nlmsg_trim(skb, nlh);
@@ -2367,7 +2370,8 @@ static int nf_tables_fill_set(struct sk_buff *skb, const struct nft_ctx *ctx,
                goto nla_put_failure;
        nla_nest_end(skb, desc);
 
-       return nlmsg_end(skb, nlh);
+       nlmsg_end(skb, nlh);
+       return 0;
 
 nla_put_failure:
        nlmsg_trim(skb, nlh);
@@ -3041,7 +3045,8 @@ static int nf_tables_fill_setelem_info(struct sk_buff *skb,
 
        nla_nest_end(skb, nest);
 
-       return nlmsg_end(skb, nlh);
+       nlmsg_end(skb, nlh);
+       return 0;
 
 nla_put_failure:
        nlmsg_trim(skb, nlh);
@@ -3330,7 +3335,8 @@ static int nf_tables_fill_gen_info(struct sk_buff *skb, struct net *net,
        if (nla_put_be32(skb, NFTA_GEN_ID, htonl(net->nft.base_seq)))
                goto nla_put_failure;
 
-       return nlmsg_end(skb, nlh);
+       nlmsg_end(skb, nlh);
+       return 0;
 
 nla_put_failure:
        nlmsg_trim(skb, nlh);