diff options
author | Patrick McHardy <kaber@trash.net> | 2008-01-23 23:33:32 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-01-28 18:11:18 -0500 |
commit | cee63723b358e594225e812d6e14a2a0abfd5c88 (patch) | |
tree | 847f929e0f445cca8cdf55d7c17a56b0d0f2ec68 /net/sched/sch_prio.c | |
parent | ab27cfb85c5778400740ad0c401bde65616774eb (diff) |
[NET_SCHED]: Propagate nla_parse return value
nla_parse() returns more detailed errno codes, propagate them back on
error.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
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. |