]> git.baikalelectronics.ru Git - kernel.git/commit
net: hns3: fix return value error of hclge_get_mac_vlan_cmd_status()
authorJian Shen <shenjian15@huawei.com>
Sat, 10 Mar 2018 03:29:31 +0000 (11:29 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 12 Mar 2018 02:53:32 +0000 (22:53 -0400)
commitc07de5c55d4e1539102e8e5baefd5ff6370e78e8
treee6221ef41520a8ba7ad49f5f1c5fa83710b268a4
parent99aef9a4342362a6d903263623b0120591aea83e
net: hns3: fix return value error of hclge_get_mac_vlan_cmd_status()

Error code -EIO was used to indicate mutilple errors in function
hclge_get_mac_vlan_cmd_status().This patch fixes it by using
error code depending on the error type.

For no space error, return -ENOSPC.
For entry not found, return -ENOENT.
For command send fail, return -EIO.
For invalid op code, return -EINVAL.

Fixes: 575d84053c84 ("net: hns3: Add HNS3 Acceleration Engine & Compatibility Layer Support")
Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c