提交 3bd6d258 编写于 作者: F Fuyun Liang 提交者: David S. Miller

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: NFuyun Liang <liangfuyun1@huawei.com>
Signed-off-by: NPeng Li <lipeng321@huawei.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 0c29ba1b
...@@ -638,7 +638,7 @@ static u32 hns3_get_rss_key_size(struct net_device *netdev) ...@@ -638,7 +638,7 @@ static u32 hns3_get_rss_key_size(struct net_device *netdev)
if (!h->ae_algo || !h->ae_algo->ops || if (!h->ae_algo || !h->ae_algo->ops ||
!h->ae_algo->ops->get_rss_key_size) !h->ae_algo->ops->get_rss_key_size)
return -EOPNOTSUPP; return 0;
return h->ae_algo->ops->get_rss_key_size(h); return h->ae_algo->ops->get_rss_key_size(h);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册