[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>
This commit is contained in:
committed by
David S. Miller
parent
ab27cfb85c
commit
cee63723b3
@@ -246,8 +246,9 @@ static int fw_change(struct tcf_proto *tp, unsigned long base,
|
||||
if (!opt)
|
||||
return handle ? -EINVAL : 0;
|
||||
|
||||
if (nla_parse_nested(tb, TCA_FW_MAX, opt, NULL) < 0)
|
||||
return -EINVAL;
|
||||
err = nla_parse_nested(tb, TCA_FW_MAX, opt, NULL);
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
if (f != NULL) {
|
||||
if (f->id != handle && handle)
|
||||
|
Reference in New Issue
Block a user