Commit a954380a authored by Vinicius Costa Gomes's avatar Vinicius Costa Gomes Committed by Jakub Kicinski

net: taprio: Fix returning EINVAL when configuring without flags

When configuring a taprio instance if "flags" is not specified (or
it's zero), taprio currently replies with an "Invalid argument" error.

So, set the return value to zero after we are done with all the
checks.

Fixes: 9c66d156 ("taprio: Add support for hardware offloading")
Signed-off-by: default avatarVinicius Costa Gomes <vinicius.gomes@intel.com>
Acked-by: default avatarVladimir Oltean <olteanv@gmail.com>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent 8cd6f4fe
...@@ -1341,6 +1341,10 @@ static int taprio_parse_clockid(struct Qdisc *sch, struct nlattr **tb, ...@@ -1341,6 +1341,10 @@ static int taprio_parse_clockid(struct Qdisc *sch, struct nlattr **tb,
NL_SET_ERR_MSG(extack, "Specifying a 'clockid' is mandatory"); NL_SET_ERR_MSG(extack, "Specifying a 'clockid' is mandatory");
goto out; goto out;
} }
/* Everything went ok, return success. */
err = 0;
out: out:
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment