Commit 60372139 authored by Jijie Shao's avatar Jijie Shao Committed by Jiantao Xiao
Browse files

net: hns3: fix wrong judgment condition issue

mainline inclusion
from mainline-v6.9-rc1
commit 07a1d6dc90baedcf5d713e2b003b9e387130ee30
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I98TUP
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=07a1d6dc90baedcf5d713e2b003b9e387130ee30



----------------------------------------------------------------------

In hns3_dcbnl_ieee_delapp, should check ieee_delapp not ieee_setapp.
This path fix the wrong judgment.

Fixes: 0ba22bcb ("net: hns3: add support config dscp map to tc")
Signed-off-by: default avatarJijie Shao <shaojijie@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarJiantao Xiao <xiaojiantao1@h-partners.com>
parent 5f01b084
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,7 +76,7 @@ static int hns3_dcbnl_ieee_delapp(struct net_device *ndev, struct dcb_app *app)
	if (hns3_nic_resetting(ndev))
		return -EBUSY;

	if (h->kinfo.dcb_ops->ieee_setapp)
	if (h->kinfo.dcb_ops->ieee_delapp)
		return h->kinfo.dcb_ops->ieee_delapp(h, app);

	return -EOPNOTSUPP;