summaryrefslogtreecommitdiffstats
path: root/arch/arm/cpu
diff options
context:
space:
mode:
authorAndrey Smirnov <andrew.smirnov@gmail.com>2016-09-01 13:39:58 -0700
committerSascha Hauer <s.hauer@pengutronix.de>2016-09-05 08:29:12 +0200
commitda1f91422c2e3479066e22cc2795b7927dfe6714 (patch)
tree1561ef1d8d2f6d4544e543605e057f720d38e695 /arch/arm/cpu
parent79a2cc9fe6b1db9255c3947f2067adc8eb3ce048 (diff)
downloadbarebox-da1f91422c2e3479066e22cc2795b7927dfe6714.tar.gz
barebox-da1f91422c2e3479066e22cc2795b7927dfe6714.tar.xz
of_unflatten_dtb(): Check return value with IS_ERR
Of_unflatten_dtb returns a ERR_PTR value so checking it against NULL is incorrect. Fix it in all of the places where this was happening. Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/cpu')
-rw-r--r--arch/arm/cpu/dtb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/cpu/dtb.c b/arch/arm/cpu/dtb.c
index ae4ff2a9ad..b9390b46e6 100644
--- a/arch/arm/cpu/dtb.c
+++ b/arch/arm/cpu/dtb.c
@@ -48,7 +48,7 @@ static int of_arm_init(void)
}
root = of_unflatten_dtb(fdt);
- if (root) {
+ if (!IS_ERR(root)) {
of_set_root_node(root);
of_fix_tree(root);
if (IS_ENABLED(CONFIG_OFDEVICE))