aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/cls_basic.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/cls_basic.c')
-rw-r--r--net/sched/cls_basic.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sched/cls_basic.c b/net/sched/cls_basic.c
index 3953da33956f..524b7885dc32 100644
--- a/net/sched/cls_basic.c
+++ b/net/sched/cls_basic.c
@@ -166,7 +166,7 @@ errout:
166static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle, 166static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
167 struct nlattr **tca, unsigned long *arg) 167 struct nlattr **tca, unsigned long *arg)
168{ 168{
169 int err = -EINVAL; 169 int err;
170 struct basic_head *head = (struct basic_head *) tp->root; 170 struct basic_head *head = (struct basic_head *) tp->root;
171 struct nlattr *tb[TCA_BASIC_MAX + 1]; 171 struct nlattr *tb[TCA_BASIC_MAX + 1];
172 struct basic_filter *f = (struct basic_filter *) *arg; 172 struct basic_filter *f = (struct basic_filter *) *arg;
@@ -174,8 +174,9 @@ static int basic_change(struct tcf_proto *tp, unsigned long base, u32 handle,
174 if (tca[TCA_OPTIONS] == NULL) 174 if (tca[TCA_OPTIONS] == NULL)
175 return -EINVAL; 175 return -EINVAL;
176 176
177 if (nla_parse_nested(tb, TCA_BASIC_MAX, tca[TCA_OPTIONS], NULL) < 0) 177 err = nla_parse_nested(tb, TCA_BASIC_MAX, tca[TCA_OPTIONS], NULL);
178 return -EINVAL; 178 if (err < 0)
179 return err;
179 180
180 if (f != NULL) { 181 if (f != NULL) {
181 if (handle && f->handle != handle) 182 if (handle && f->handle != handle)