diff options
author | loos <loos@FreeBSD.org> | 2017-04-30 07:31:48 +0000 |
---|---|---|
committer | Luiz Souza <luiz@netgate.com> | 2017-09-06 11:52:41 -0500 |
commit | fca19cbcae7aaf2f6464cbd10d0f12d87140c542 (patch) | |
tree | b17a7c664cef8a0a3631cdf7c3a3c74450dd5d62 /sys/dev/fdt/fdt_common.c | |
parent | 88d3d755ca715ebdd64bdfba77ec7f25cb470cdf (diff) | |
download | FreeBSD-src-fca19cbcae7aaf2f6464cbd10d0f12d87140c542.zip FreeBSD-src-fca19cbcae7aaf2f6464cbd10d0f12d87140c542.tar.gz |
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
(cherry picked from commit 1bbed8ea99021d00324e8429e59b5f80b4328d06)
Diffstat (limited to 'sys/dev/fdt/fdt_common.c')
-rw-r--r-- | sys/dev/fdt/fdt_common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/fdt/fdt_common.c b/sys/dev/fdt/fdt_common.c index 842d176..aaaa614 100644 --- a/sys/dev/fdt/fdt_common.c +++ b/sys/dev/fdt/fdt_common.c @@ -417,7 +417,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) |