diff options
author | Luiz Otavio O Souza <loos@FreeBSD.org> | 2017-04-30 07:31:48 +0000 |
---|---|---|
committer | Luiz Otavio O Souza <loos@FreeBSD.org> | 2017-04-30 07:31:48 +0000 |
commit | 948dad6add3924fb98895cbe977d999dfc25294e (patch) | |
tree | dc5740b352f9e3836dec69e8b1c614e9cafcb591 /sys/dev/fdt | |
parent | c4f2941e0b131893cdda84d635d356eb273f2093 (diff) | |
download | src-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.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 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) |