net: hns3: fix return value handle issue for hclge_set_loopback()
authorJian Shen <shenjian15@huawei.com>
Sat, 26 Jan 2019 16:49:13 +0000 (00:49 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 26 Jan 2019 17:33:30 +0000 (09:33 -0800)
commit47ef6deccdfffaef8f56c5021a83a774fc77ee13
tree3b5edc78332d8fdd984e5c49044d7bac1c66370a
parent1821dce9ae6c6d70e9e9ea93638855e7a27797ca
net: hns3: fix return value handle issue for hclge_set_loopback()

In current code, it always return 0, even loopback mode setting failed.
It's incorrect. This patch fixes return value handle for loopback test.

Fixes: 0f29fc23b21d ("net: hns3: Fix for loopback selftest failed problem")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Huazhong Tan <tanhuazhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3_ethtool.c
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c