net: hns3: fix for returning wrong value problem in hns3_get_rss_key_size
authorFuyun Liang <liangfuyun1@huawei.com>
Sat, 24 Mar 2018 03:32:43 +0000 (11:32 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 26 Mar 2018 16:12:26 +0000 (12:12 -0400)
commit3bd6d258b1d5f76744567855d1376358a94f127d
treeca04c0b52d7535df3c67d163774535b9d9e1258d
parent0c29ba1b43df1eb7d8beb03fc929d2dac4c15f7e
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>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c