diff options
Diffstat (limited to 'net/ipv4/devinet.c')
-rw-r--r-- | net/ipv4/devinet.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c index 214882e7d6de..f0b4a31d7bd6 100644 --- a/net/ipv4/devinet.c +++ b/net/ipv4/devinet.c | |||
@@ -1522,7 +1522,8 @@ static int inet_fill_ifaddr(struct sk_buff *skb, struct in_ifaddr *ifa, | |||
1522 | preferred, valid)) | 1522 | preferred, valid)) |
1523 | goto nla_put_failure; | 1523 | goto nla_put_failure; |
1524 | 1524 | ||
1525 | return nlmsg_end(skb, nlh); | 1525 | nlmsg_end(skb, nlh); |
1526 | return 0; | ||
1526 | 1527 | ||
1527 | nla_put_failure: | 1528 | nla_put_failure: |
1528 | nlmsg_cancel(skb, nlh); | 1529 | nlmsg_cancel(skb, nlh); |
@@ -1566,7 +1567,7 @@ static int inet_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) | |||
1566 | if (inet_fill_ifaddr(skb, ifa, | 1567 | if (inet_fill_ifaddr(skb, ifa, |
1567 | NETLINK_CB(cb->skb).portid, | 1568 | NETLINK_CB(cb->skb).portid, |
1568 | cb->nlh->nlmsg_seq, | 1569 | cb->nlh->nlmsg_seq, |
1569 | RTM_NEWADDR, NLM_F_MULTI) <= 0) { | 1570 | RTM_NEWADDR, NLM_F_MULTI) < 0) { |
1570 | rcu_read_unlock(); | 1571 | rcu_read_unlock(); |
1571 | goto done; | 1572 | goto done; |
1572 | } | 1573 | } |
@@ -1749,7 +1750,8 @@ static int inet_netconf_fill_devconf(struct sk_buff *skb, int ifindex, | |||
1749 | IPV4_DEVCONF(*devconf, PROXY_ARP)) < 0) | 1750 | IPV4_DEVCONF(*devconf, PROXY_ARP)) < 0) |
1750 | goto nla_put_failure; | 1751 | goto nla_put_failure; |
1751 | 1752 | ||
1752 | return nlmsg_end(skb, nlh); | 1753 | nlmsg_end(skb, nlh); |
1754 | return 0; | ||
1753 | 1755 | ||
1754 | nla_put_failure: | 1756 | nla_put_failure: |
1755 | nlmsg_cancel(skb, nlh); | 1757 | nlmsg_cancel(skb, nlh); |
@@ -1881,7 +1883,7 @@ static int inet_netconf_dump_devconf(struct sk_buff *skb, | |||
1881 | cb->nlh->nlmsg_seq, | 1883 | cb->nlh->nlmsg_seq, |
1882 | RTM_NEWNETCONF, | 1884 | RTM_NEWNETCONF, |
1883 | NLM_F_MULTI, | 1885 | NLM_F_MULTI, |
1884 | -1) <= 0) { | 1886 | -1) < 0) { |
1885 | rcu_read_unlock(); | 1887 | rcu_read_unlock(); |
1886 | goto done; | 1888 | goto done; |
1887 | } | 1889 | } |
@@ -1897,7 +1899,7 @@ cont: | |||
1897 | NETLINK_CB(cb->skb).portid, | 1899 | NETLINK_CB(cb->skb).portid, |
1898 | cb->nlh->nlmsg_seq, | 1900 | cb->nlh->nlmsg_seq, |
1899 | RTM_NEWNETCONF, NLM_F_MULTI, | 1901 | RTM_NEWNETCONF, NLM_F_MULTI, |
1900 | -1) <= 0) | 1902 | -1) < 0) |
1901 | goto done; | 1903 | goto done; |
1902 | else | 1904 | else |
1903 | h++; | 1905 | h++; |
@@ -1908,7 +1910,7 @@ cont: | |||
1908 | NETLINK_CB(cb->skb).portid, | 1910 | NETLINK_CB(cb->skb).portid, |
1909 | cb->nlh->nlmsg_seq, | 1911 | cb->nlh->nlmsg_seq, |
1910 | RTM_NEWNETCONF, NLM_F_MULTI, | 1912 | RTM_NEWNETCONF, NLM_F_MULTI, |
1911 | -1) <= 0) | 1913 | -1) < 0) |
1912 | goto done; | 1914 | goto done; |
1913 | else | 1915 | else |
1914 | h++; | 1916 | h++; |
@@ -2320,7 +2322,7 @@ static __net_initdata struct pernet_operations devinet_ops = { | |||
2320 | .exit = devinet_exit_net, | 2322 | .exit = devinet_exit_net, |
2321 | }; | 2323 | }; |
2322 | 2324 | ||
2323 | static struct rtnl_af_ops inet_af_ops = { | 2325 | static struct rtnl_af_ops inet_af_ops __read_mostly = { |
2324 | .family = AF_INET, | 2326 | .family = AF_INET, |
2325 | .fill_link_af = inet_fill_link_af, | 2327 | .fill_link_af = inet_fill_link_af, |
2326 | .get_link_af_size = inet_get_link_af_size, | 2328 | .get_link_af_size = inet_get_link_af_size, |