From bfe946c9593513b0ad1b440bcd997b263487b945 Mon Sep 17 00:00:00 2001 From: Ulrich Ölmann Date: Tue, 27 Sep 2016 09:30:58 +0200 Subject: blspec: fix return value of entry_is_of_compatible() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Sascha Hauer --- common/blspec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'common/blspec.c') 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; } -- cgit v1.2.3