diff options
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 352b46f98440..fb8f138b9776 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -1824,6 +1824,7 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb, | |||
1824 | { | 1824 | { |
1825 | struct sk_buff *skb; | 1825 | struct sk_buff *skb; |
1826 | u32 portid = oskb ? NETLINK_CB(oskb).portid : 0; | 1826 | u32 portid = oskb ? NETLINK_CB(oskb).portid : 0; |
1827 | int err = 0; | ||
1827 | 1828 | ||
1828 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); | 1829 | skb = alloc_skb(NLMSG_GOODSIZE, GFP_KERNEL); |
1829 | if (!skb) | 1830 | if (!skb) |
@@ -1834,8 +1835,11 @@ static int tclass_notify(struct net *net, struct sk_buff *oskb, | |||
1834 | return -EINVAL; | 1835 | return -EINVAL; |
1835 | } | 1836 | } |
1836 | 1837 | ||
1837 | return rtnetlink_send(skb, net, portid, RTNLGRP_TC, | 1838 | err = rtnetlink_send(skb, net, portid, RTNLGRP_TC, |
1838 | n->nlmsg_flags & NLM_F_ECHO); | 1839 | n->nlmsg_flags & NLM_F_ECHO); |
1840 | if (err > 0) | ||
1841 | err = 0; | ||
1842 | return err; | ||
1839 | } | 1843 | } |
1840 | 1844 | ||
1841 | static int tclass_del_notify(struct net *net, | 1845 | static int tclass_del_notify(struct net *net, |
@@ -1866,8 +1870,11 @@ static int tclass_del_notify(struct net *net, | |||
1866 | return err; | 1870 | return err; |
1867 | } | 1871 | } |
1868 | 1872 | ||
1869 | return rtnetlink_send(skb, net, portid, RTNLGRP_TC, | 1873 | err = rtnetlink_send(skb, net, portid, RTNLGRP_TC, |
1870 | n->nlmsg_flags & NLM_F_ECHO); | 1874 | n->nlmsg_flags & NLM_F_ECHO); |
1875 | if (err > 0) | ||
1876 | err = 0; | ||
1877 | return err; | ||
1871 | } | 1878 | } |
1872 | 1879 | ||
1873 | #ifdef CONFIG_NET_CLS | 1880 | #ifdef CONFIG_NET_CLS |