]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
net: taprio: Fix returning EINVAL when configuring without flags
authorVinicius Costa Gomes <vinicius.gomes@intel.com>
Tue, 8 Oct 2019 23:20:07 +0000 (16:20 -0700)
committerJakub Kicinski <jakub.kicinski@netronome.com>
Thu, 10 Oct 2019 01:49:19 +0000 (18:49 -0700)
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: 9c66d1564676 ("taprio: Add support for hardware offloading")
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Acked-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
net/sched/sch_taprio.c

index 68b543f85a96b1065e040a53ca8778ce60f775cc..6719a65169d49bc0b4e3b9ddd796ed998b82b61a 100644 (file)
@@ -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");
                goto out;
        }
+
+       /* Everything went ok, return success. */
+       err = 0;
+
 out:
        return err;
 }