Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Brugger <mbrugger@suse.com>2017-11-24 13:51:29 +0100
committerMatthias Brugger <mbrugger@suse.com>2017-11-30 18:28:48 +0100
commitbae132736ba158f79e5230c4d44866b27063fd1a (patch)
tree0ff35dabb8c9ca46e5ec5e107fa9a87be6acfdcd
parent33ea6bd471112976f207e9938266f4626f377546 (diff)
net: hns: set correct return value (bsc#1068693).
-rw-r--r--drivers/net/ethernet/hisilicon/hns/hns_enet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/hisilicon/hns/hns_enet.c b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
index 36520634c96a..e77192683dba 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c
@@ -2369,8 +2369,8 @@ static int hns_nic_dev_probe(struct platform_device *pdev)
priv->enet_ver = AE_VERSION_2;
ae_node = of_parse_phandle(dev->of_node, "ae-handle", 0);
- if (IS_ERR_OR_NULL(ae_node)) {
- ret = PTR_ERR(ae_node);
+ if (!ae_node) {
+ ret = -ENODEV;
dev_err(dev, "not find ae-handle\n");
goto out_read_prop_fail;
}