From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Pirko Subject: [patch net-next] net: sched: don't set extack message in case the qdisc will be created Date: Thu, 28 Dec 2017 16:52:10 +0100 Message-ID: <20171228155210.1177-1-jiri@resnulli.us> Cc: davem@davemloft.net, jhs@mojatatu.com, xiyou.wangcong@gmail.com, mlxsw@mellanox.com, aring@mojatatu.com To: netdev@vger.kernel.org Return-path: Received: from mail-wr0-f195.google.com ([209.85.128.195]:46120 "EHLO mail-wr0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750899AbdL1PwM (ORCPT ); Thu, 28 Dec 2017 10:52:12 -0500 Received: by mail-wr0-f195.google.com with SMTP id g17so30293348wrd.13 for ; Thu, 28 Dec 2017 07:52:12 -0800 (PST) Sender: netdev-owner@vger.kernel.org List-ID: From: Jiri Pirko 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: 09215598119e ("net: sched: sch_api: handle generic qdisc errors") Signed-off-by: Jiri Pirko --- net/sched/sch_api.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 3a3a1da..81ecf5b 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1402,10 +1402,8 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, 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; -- 2.9.5