1
0
Fork 0

net: sched: don't set extack message in case the qdisc will be created

If the qdisc is not found here, it is going to be created. Therefore,
this is not an error path. Remove the extack message set and don't
confuse user with error message in case the qdisc was created
successfully.

Fixes: 0921559811 ("net: sched: sch_api: handle generic qdisc errors")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
hifive-unleashed-5.1
Jiri Pirko 2017-12-28 16:52:10 +01:00 committed by David S. Miller
parent d3dbd7a6aa
commit 8ec6957403
1 changed files with 1 additions and 3 deletions

View File

@ -1402,10 +1402,8 @@ replay:
return -EINVAL;
}
q = qdisc_lookup(dev, tcm->tcm_handle);
if (!q) {
NL_SET_ERR_MSG(extack, "No qdisc found for specified handle");
if (!q)
goto create_n_graft;
}
if (n->nlmsg_flags & NLM_F_EXCL) {
NL_SET_ERR_MSG(extack, "Exclusivity flag on, cannot override");
return -EEXIST;