X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=net%2Fsched%2Fsch_prio.c;h=4aa2b45dad0a80232ed1d1d1c2fbabf33b19ec8f;hb=c970d5a32ae1a90fba89892cc3432cf0b408cb8b;hp=a4f932df86e93ffbc502d9983f1c7eeb8e938cdc;hpb=1e90474c377e92db7262a8968a45c1dd980ca9e5;p=~andy%2Flinux diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index a4f932df86e..4aa2b45dad0 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) struct prio_sched_data *q = qdisc_priv(sch); struct tc_prio_qopt *qopt; struct nlattr *tb[TCA_PRIO_MAX + 1]; + int err; int i; - if (nla_parse_nested_compat(tb, TCA_PRIO_MAX, opt, NULL, qopt, - sizeof(*qopt))) - return -EINVAL; + err = nla_parse_nested_compat(tb, TCA_PRIO_MAX, opt, NULL, qopt, + sizeof(*qopt)); + if (err < 0) + return err; + q->bands = qopt->bands; /* If we're multiqueue, make sure the number of incoming bands * matches the number of queues on the device we're associating with.