aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/neighbour.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/core/neighbour.c')
-rw-r--r--net/core/neighbour.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 8d614c93f86a..70fe9e10ac86 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1884,7 +1884,8 @@ static int neightbl_fill_info(struct sk_buff *skb, struct neigh_table *tbl,
1884 goto nla_put_failure; 1884 goto nla_put_failure;
1885 1885
1886 read_unlock_bh(&tbl->lock); 1886 read_unlock_bh(&tbl->lock);
1887 return nlmsg_end(skb, nlh); 1887 nlmsg_end(skb, nlh);
1888 return 0;
1888 1889
1889nla_put_failure: 1890nla_put_failure:
1890 read_unlock_bh(&tbl->lock); 1891 read_unlock_bh(&tbl->lock);
@@ -1917,7 +1918,8 @@ static int neightbl_fill_param_info(struct sk_buff *skb,
1917 goto errout; 1918 goto errout;
1918 1919
1919 read_unlock_bh(&tbl->lock); 1920 read_unlock_bh(&tbl->lock);
1920 return nlmsg_end(skb, nlh); 1921 nlmsg_end(skb, nlh);
1922 return 0;
1921errout: 1923errout:
1922 read_unlock_bh(&tbl->lock); 1924 read_unlock_bh(&tbl->lock);
1923 nlmsg_cancel(skb, nlh); 1925 nlmsg_cancel(skb, nlh);
@@ -2126,7 +2128,7 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
2126 2128
2127 if (neightbl_fill_info(skb, tbl, NETLINK_CB(cb->skb).portid, 2129 if (neightbl_fill_info(skb, tbl, NETLINK_CB(cb->skb).portid,
2128 cb->nlh->nlmsg_seq, RTM_NEWNEIGHTBL, 2130 cb->nlh->nlmsg_seq, RTM_NEWNEIGHTBL,
2129 NLM_F_MULTI) <= 0) 2131 NLM_F_MULTI) < 0)
2130 break; 2132 break;
2131 2133
2132 nidx = 0; 2134 nidx = 0;
@@ -2142,7 +2144,7 @@ static int neightbl_dump_info(struct sk_buff *skb, struct netlink_callback *cb)
2142 NETLINK_CB(cb->skb).portid, 2144 NETLINK_CB(cb->skb).portid,
2143 cb->nlh->nlmsg_seq, 2145 cb->nlh->nlmsg_seq,
2144 RTM_NEWNEIGHTBL, 2146 RTM_NEWNEIGHTBL,
2145 NLM_F_MULTI) <= 0) 2147 NLM_F_MULTI) < 0)
2146 goto out; 2148 goto out;
2147 next: 2149 next:
2148 nidx++; 2150 nidx++;
@@ -2202,7 +2204,8 @@ static int neigh_fill_info(struct sk_buff *skb, struct neighbour *neigh,
2202 nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci)) 2204 nla_put(skb, NDA_CACHEINFO, sizeof(ci), &ci))
2203 goto nla_put_failure; 2205 goto nla_put_failure;
2204 2206
2205 return nlmsg_end(skb, nlh); 2207 nlmsg_end(skb, nlh);
2208 return 0;
2206 2209
2207nla_put_failure: 2210nla_put_failure:
2208 nlmsg_cancel(skb, nlh); 2211 nlmsg_cancel(skb, nlh);
@@ -2232,7 +2235,8 @@ static int pneigh_fill_info(struct sk_buff *skb, struct pneigh_entry *pn,
2232 if (nla_put(skb, NDA_DST, tbl->key_len, pn->key)) 2235 if (nla_put(skb, NDA_DST, tbl->key_len, pn->key))
2233 goto nla_put_failure; 2236 goto nla_put_failure;
2234 2237
2235 return nlmsg_end(skb, nlh); 2238 nlmsg_end(skb, nlh);
2239 return 0;
2236 2240
2237nla_put_failure: 2241nla_put_failure:
2238 nlmsg_cancel(skb, nlh); 2242 nlmsg_cancel(skb, nlh);
@@ -2270,7 +2274,7 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
2270 if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid, 2274 if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid,
2271 cb->nlh->nlmsg_seq, 2275 cb->nlh->nlmsg_seq,
2272 RTM_NEWNEIGH, 2276 RTM_NEWNEIGH,
2273 NLM_F_MULTI) <= 0) { 2277 NLM_F_MULTI) < 0) {
2274 rc = -1; 2278 rc = -1;
2275 goto out; 2279 goto out;
2276 } 2280 }
@@ -2307,7 +2311,7 @@ static int pneigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
2307 if (pneigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid, 2311 if (pneigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid,
2308 cb->nlh->nlmsg_seq, 2312 cb->nlh->nlmsg_seq,
2309 RTM_NEWNEIGH, 2313 RTM_NEWNEIGH,
2310 NLM_F_MULTI, tbl) <= 0) { 2314 NLM_F_MULTI, tbl) < 0) {
2311 read_unlock_bh(&tbl->lock); 2315 read_unlock_bh(&tbl->lock);
2312 rc = -1; 2316 rc = -1;
2313 goto out; 2317 goto out;