diff options
author | Fuyun Liang <liangfuyun1@huawei.com> | 2018-03-24 11:32:43 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-26 12:12:26 -0400 |
commit | 3bd6d258b1d5f76744567855d1376358a94f127d (patch) | |
tree | ca04c0b52d7535df3c67d163774535b9d9e1258d | |
parent | 0c29ba1b43df1eb7d8beb03fc929d2dac4c15f7e (diff) |
net: hns3: fix for returning wrong value problem in hns3_get_rss_key_size
The return type of hns3_get_rss_key_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>
-rw-r--r-- | drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c | 2 |
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 9d07116a4426..ac523c90d604 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c @@ -638,7 +638,7 @@ static u32 hns3_get_rss_key_size(struct net_device *netdev) if (!h->ae_algo || !h->ae_algo->ops || !h->ae_algo->ops->get_rss_key_size) - return -EOPNOTSUPP; + return 0; return h->ae_algo->ops->get_rss_key_size(h); } |