diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2014-01-16 20:53:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-01-16 22:12:03 -0500 |
commit | 722e47d7929b40f58c2ad609429c7293e41ca5a8 (patch) | |
tree | 5d95917e06b150911e3d189f9649e5bf03b33554 /net/sched | |
parent | 8b88a11e4451a967973b7b8b5e82ff62f3d69945 (diff) |
net_sched: fix error return code in fw_change_attrs()
The error code was not set if change indev fail, so the error
condition wasn't reflected in the return value. Fix to return a
negative error code from this error handling case instead of 0.
Fixes: 2519a602c273 ('net_sched: optimize tcf_match_indev()')
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched')
-rw-r--r-- | net/sched/cls_fw.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/cls_fw.c b/net/sched/cls_fw.c index ed00e8c21cea..a366537f82c6 100644 --- a/net/sched/cls_fw.c +++ b/net/sched/cls_fw.c | |||
@@ -209,8 +209,10 @@ fw_change_attrs(struct net *net, struct tcf_proto *tp, struct fw_filter *f, | |||
209 | if (tb[TCA_FW_INDEV]) { | 209 | if (tb[TCA_FW_INDEV]) { |
210 | int ret; | 210 | int ret; |
211 | ret = tcf_change_indev(net, tb[TCA_FW_INDEV]); | 211 | ret = tcf_change_indev(net, tb[TCA_FW_INDEV]); |
212 | if (ret < 0) | 212 | if (ret < 0) { |
213 | err = ret; | ||
213 | goto errout; | 214 | goto errout; |
215 | } | ||
214 | f->ifindex = ret; | 216 | f->ifindex = ret; |
215 | } | 217 | } |
216 | #endif /* CONFIG_NET_CLS_IND */ | 218 | #endif /* CONFIG_NET_CLS_IND */ |