aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
diff options
context:
space:
mode:
authorFuyun Liang <liangfuyun1@huawei.com>2018-03-24 11:32:44 +0800
committerDavid S. Miller <davem@davemloft.net>2018-03-26 12:12:26 -0400
commitda44a00f06df1f823ea449065e79581ee624de4b (patch)
tree3d16f1b67ca913cb32c87f2e8b568ea16ab83204 /drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
parentnet: hns3: fix for returning wrong value problem in hns3_get_rss_key_size (diff)
downloadlinux-dev-da44a00f06df1f823ea449065e79581ee624de4b.tar.xz
linux-dev-da44a00f06df1f823ea449065e79581ee624de4b.zip
net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size
The return type of hns3_get_rss_indir_size is u32. But a negative value is returned. This patch fixes it by replacing the negative value with zero. Signed-off-by: Fuyun Liang <liangfuyun1@huawei.com> Signed-off-by: Peng Li <lipeng321@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
index ac523c90d604..eb3c34f3cf87 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
@@ -649,7 +649,7 @@ static u32 hns3_get_rss_indir_size(struct net_device *netdev)
if (!h->ae_algo || !h->ae_algo->ops ||
!h->ae_algo->ops->get_rss_indir_size)
- return -EOPNOTSUPP;
+ return 0;
return h->ae_algo->ops->get_rss_indir_size(h);
}