[rtems commit] libfdt: Correct condition for reordering blocks
Sebastian Huber
sebh at rtems.org
Thu Dec 16 13:58:33 UTC 2021
Module: rtems
Branch: master
Commit: eaadf704976f575d6d2c43a96580e85b8eb3c598
Changeset: http://git.rtems.org/rtems/commit/?id=eaadf704976f575d6d2c43a96580e85b8eb3c598
Author: Simon Glass <sjg at chromium.org>
Date: Mon Jun 15 10:00:33 2020 -0600
libfdt: Correct condition for reordering blocks
This condition uses bitwise OR but should be logical OR. Fix it.
Signed-off-by: Simon Glass <sjg at chromium.org>
Reported-by: kernel test robot <lkp at intel.com>
Message-Id: <20200615160033.87328-1-sjg at chromium.org>
Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
cpukit/dtc/libfdt/fdt_rw.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/cpukit/dtc/libfdt/fdt_rw.c b/cpukit/dtc/libfdt/fdt_rw.c
index 524b520..93e4a2b 100644
--- a/cpukit/dtc/libfdt/fdt_rw.c
+++ b/cpukit/dtc/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);
More information about the vc
mailing list