From 7be250b4d059771c47be00ec8d4df7f47e4ac77c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 15 Jun 2020 10:00:33 -0600 Subject: [PATCH] libfdt: Correct condition for reordering blocks This condition uses bitwise OR but should be logical OR. Fix it. Signed-off-by: Simon Glass Reported-by: kernel test robot Message-Id: <20200615160033.87328-1-sjg@chromium.org> Signed-off-by: David Gibson --- libfdt/fdt_rw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libfdt/fdt_rw.c b/libfdt/fdt_rw.c index 524b520..93e4a2b 100644 --- a/libfdt/fdt_rw.c +++ b/libfdt/fdt_rw.c @@ -436,7 +436,7 @@ int fdt_open_into(const void *fdt, void *buf, int bufsize) return struct_size; } - if (can_assume(LIBFDT_ORDER) | + if (can_assume(LIBFDT_ORDER) || !fdt_blocks_misordered_(fdt, mem_rsv_size, struct_size)) { /* no further work necessary */ err = fdt_move(fdt, buf, bufsize);