aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/fdt
diff options
context:
space:
mode:
authorLuiz Otavio O Souza <loos@FreeBSD.org>2017-04-30 07:31:48 +0000
committerLuiz Otavio O Souza <loos@FreeBSD.org>2017-04-30 07:31:48 +0000
commit948dad6add3924fb98895cbe977d999dfc25294e (patch)
treedc5740b352f9e3836dec69e8b1c614e9cafcb591 /sys/dev/fdt
parentc4f2941e0b131893cdda84d635d356eb273f2093 (diff)
downloadsrc-948dad6add3924fb98895cbe977d999dfc25294e.tar.gz
src-948dad6add3924fb98895cbe977d999dfc25294e.zip
Set the correct default for #address-cells variable when the property does
not exist. This has never caused any issue because #address-cells is mandatory. Sponsored by: Rubicon Communications, LLC (Netgate) MFC after: 2 weeks
Notes
Notes: svn path=/head/; revision=317604
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r--sys/dev/fdt/fdt_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c
index 3e59fb977075..cf7b39b4a715 100644
--- a/sys/dev/fdt/fdt_common.c
+++ b/sys/dev/fdt/fdt_common.c
@@ -422,7 +422,7 @@ fdt_addrsize_cells(phandle_t node, int *addr_cells, int *size_cells)
*/
cell_size = sizeof(cell);
if (OF_getencprop(node, "#address-cells", &cell, cell_size) < cell_size)
- *addr_cells = 2;
+ cell = 2;
*addr_cells = (int)cell;
if (OF_getencprop(node, "#size-cells", &cell, cell_size) < cell_size)