diff options
author | Ulrich Ölmann <u.oelmann@pengutronix.de> | 2016-09-27 09:30:58 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2016-09-28 08:28:49 +0200 |
commit | bfe946c9593513b0ad1b440bcd997b263487b945 (patch) | |
tree | 1c307aa6e968c133792fd7a7ecad7be27e0bc513 /common/blspec.c | |
parent | 71f6328d0093207b20ef110dffb9273cd232cba3 (diff) | |
download | barebox-bfe946c9593513b0ad1b440bcd997b263487b945.tar.gz barebox-bfe946c9593513b0ad1b440bcd997b263487b945.tar.xz |
blspec: fix return value of entry_is_of_compatible()
The function returns a boolean and not an integer. Hence the former
explicit/implicit cast of an ERR_PTR to a boolean has led to a return value of
true although a bootspec entry with a faulty devicetree is not compatible.
Signed-off-by: Ulrich Ölmann <u.oelmann@pengutronix.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'common/blspec.c')
-rw-r--r-- | common/blspec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/common/blspec.c b/common/blspec.c index e079e8fd92..82b61f8741 100644 --- a/common/blspec.c +++ b/common/blspec.c @@ -394,7 +394,7 @@ static bool entry_is_of_compatible(struct blspec_entry *entry) root = of_unflatten_dtb(fdt); if (IS_ERR(root)) { - ret = PTR_ERR(root); + ret = false; root = NULL; goto out; } |