net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size
authorFuyun Liang <liangfuyun1@huawei.com>
Sat, 24 Mar 2018 03:32:44 +0000 (11:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 May 2018 06:17:28 +0000 (08:17 +0200)
commit2ee4b4acbb5e53bbe78ea0c67bdbb5950c76f571
treefe34e62f83223575841515abfbdf7aba3679d4af
parent03d2d8a4baf3ce44b616d2a361b9b752366b8676
net: hns3: fix for returning wrong value problem in hns3_get_rss_indir_size

[ Upstream commit da44a00f06df1f823ea449065e79581ee624de4b ]

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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c