summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorFugang Duan <fugang.duan@nxp.com>2020-10-30 10:36:14 +0800
committerFugang Duan <fugang.duan@nxp.com>2020-10-30 11:08:17 +0800
commit845620ec5d3b836956c2eee09cab8dcf0ba89636 (patch)
tree6edb38db4acf8dbb06c1ea3e73880179b3678a81 /arch/arm/mach-imx
parent6644cc2f3b30841699548c46e079a5d2fb0ad4d2 (diff)
MLK-24940 arm: imx: correctly check the return value of "of_get_mac_address"
commit d01f449c008a ("of_net: add NVMEM support to of_get_mac_address") introduces more return value types, so it has to use IS_ERR to check the return value. Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com> Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/common.c b/arch/arm/mach-imx/common.c
index 2f644c6b2c28..1792c80721d9 100644
--- a/arch/arm/mach-imx/common.c
+++ b/arch/arm/mach-imx/common.c
@@ -59,7 +59,7 @@ void __init imx6_enet_mac_init(const char *enet_compat, const char *ocotp_compat
from = enet_np;
- if (of_get_mac_address(enet_np))
+ if (!IS_ERR(of_get_mac_address(enet_np)))
goto put_enet_node;
id = of_alias_get_id(enet_np, "ethernet");