diff options
Diffstat (limited to 'net/sched/sch_prio.c')
-rw-r--r-- | net/sched/sch_prio.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index a4f932df86e9..4aa2b45dad0a 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -229,11 +229,14 @@ static int prio_tune(struct Qdisc *sch, struct nlattr *opt) | |||
229 | struct prio_sched_data *q = qdisc_priv(sch); | 229 | struct prio_sched_data *q = qdisc_priv(sch); |
230 | struct tc_prio_qopt *qopt; | 230 | struct tc_prio_qopt *qopt; |
231 | struct nlattr *tb[TCA_PRIO_MAX + 1]; | 231 | struct nlattr *tb[TCA_PRIO_MAX + 1]; |
232 | int err; | ||
232 | int i; | 233 | int i; |
233 | 234 | ||
234 | if (nla_parse_nested_compat(tb, TCA_PRIO_MAX, opt, NULL, qopt, | 235 | err = nla_parse_nested_compat(tb, TCA_PRIO_MAX, opt, NULL, qopt, |
235 | sizeof(*qopt))) | 236 | sizeof(*qopt)); |
236 | return -EINVAL; | 237 | if (err < 0) |
238 | return err; | ||
239 | |||
237 | q->bands = qopt->bands; | 240 | q->bands = qopt->bands; |
238 | /* If we're multiqueue, make sure the number of incoming bands | 241 | /* If we're multiqueue, make sure the number of incoming bands |
239 | * matches the number of queues on the device we're associating with. | 242 | * matches the number of queues on the device we're associating with. |