mirror of
https://github.com/dgibson/dtc.git
synced 2025-10-14 00:37:41 -04:00
checks: Fix bus-range check
The upper limit of the bus-range is specified by the second cell of the bus-range property. Signed-off-by: Thierry Reding <treding@nvidia.com> Message-Id: <20210629114304.2451114-1-thierry.reding@gmail.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
72d09e2682
commit
69595a167f
1 changed files with 1 additions and 1 deletions
2
checks.c
2
checks.c
|
@ -892,7 +892,7 @@ static void check_pci_device_bus_num(struct check *c, struct dt_info *dti, struc
|
||||||
} else {
|
} else {
|
||||||
cells = (cell_t *)prop->val.val;
|
cells = (cell_t *)prop->val.val;
|
||||||
min_bus = fdt32_to_cpu(cells[0]);
|
min_bus = fdt32_to_cpu(cells[0]);
|
||||||
max_bus = fdt32_to_cpu(cells[0]);
|
max_bus = fdt32_to_cpu(cells[1]);
|
||||||
}
|
}
|
||||||
if ((bus_num < min_bus) || (bus_num > max_bus))
|
if ((bus_num < min_bus) || (bus_num > max_bus))
|
||||||
FAIL_PROP(c, dti, node, prop, "PCI bus number %d out of range, expected (%d - %d)",
|
FAIL_PROP(c, dti, node, prop, "PCI bus number %d out of range, expected (%d - %d)",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue