mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-29 12:03:03 +00:00
[mv] Fix invalid condition in fdt_fixup_ranges
Add parentheses to perform assignment before comparison. The prior condition worked because fdt_parent_addr_cells returns 1 for the DTB on which fdt_fixup_ranges is called and accidentally par_addr_cells ends up to be set to the same value. PR: 210705 Submitted by: David Binderman <dcb314@hotmail.com> MFC after: 1 week
This commit is contained in:
parent
e719f737b7
commit
3ea5899793
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=343104
@ -2935,7 +2935,7 @@ fdt_fixup_ranges(phandle_t root)
|
||||
/* Fix-up SoC ranges according to real fdt_immr_pa */
|
||||
if ((node = fdt_find_compatible(root, "simple-bus", 1)) != 0) {
|
||||
if (fdt_addrsize_cells(node, &addr_cells, &size_cells) == 0 &&
|
||||
(par_addr_cells = fdt_parent_addr_cells(node) <= 2)) {
|
||||
((par_addr_cells = fdt_parent_addr_cells(node)) <= 2)) {
|
||||
tuple_size = sizeof(pcell_t) * (par_addr_cells +
|
||||
addr_cells + size_cells);
|
||||
len = OF_getprop(node, "ranges", ranges,
|
||||
|
Loading…
Reference in New Issue
Block a user