mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 14:19:09 -04:00
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>
This commit is contained in:
parent
3bd6d258b1
commit
da44a00f06
1 changed files with 1 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue