diff options
author | Andrey Smirnov <andrew.smirnov@gmail.com> | 2016-09-01 13:39:58 -0700 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-05 08:29:12 +0200 |
commit | da1f91422c2e3479066e22cc2795b7927dfe6714 (patch) | |
tree | 1561ef1d8d2f6d4544e543605e057f720d38e695 /arch/arm/boards/highbank/init.c | |
parent | 79a2cc9fe6b1db9255c3947f2067adc8eb3ce048 (diff) | |
download | barebox-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/boards/highbank/init.c')
-rw-r--r-- | arch/arm/boards/highbank/init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm/boards/highbank/init.c b/arch/arm/boards/highbank/init.c index 1cb02e6e48..295d4757f2 100644 --- a/arch/arm/boards/highbank/init.c +++ b/arch/arm/boards/highbank/init.c @@ -77,7 +77,7 @@ static int highbank_mem_init(void) fdt = IOMEM(FIRMWARE_DTB_BASE); root = of_unflatten_dtb(fdt); - if (!root) { + if (IS_ERR(root)) { pr_warn("no dtb found at 0x1000 use default configuration\n"); fdt = NULL; goto not_found; |