From da1f91422c2e3479066e22cc2795b7927dfe6714 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Thu, 1 Sep 2016 13:39:58 -0700 Subject: 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 Signed-off-by: Sascha Hauer --- arch/arm/cpu/dtb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/cpu') 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)) -- cgit v1.2.3