[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>
此提交包含在:
Patrick McHardy
2008-01-23 20:33:32 -08:00
提交者 David S. Miller
父節點 ab27cfb85c
當前提交 cee63723b3
共有 25 個檔案被更改,包括 171 行新增60 行删除

查看文件

@@ -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.