aboutsummaryrefslogtreecommitdiff
path: root/checks.c
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2021-06-29 13:43:04 +0200
committerDavid Gibson <david@gibson.dropbear.id.au>2021-06-30 10:32:13 +1000
commit69595a167f06c4482ce784e30df1ac9b16ceb5b0 (patch)
tree06504f0ce4e0c7c4de963675e0c9c40894ea37f3 /checks.c
parent72d09e2682a41589b46b8cdd4c393b8ed47ac266 (diff)
downloaddtc-69595a167f06c4482ce784e30df1ac9b16ceb5b0.zip
dtc-69595a167f06c4482ce784e30df1ac9b16ceb5b0.tar.gz
dtc-69595a167f06c4482ce784e30df1ac9b16ceb5b0.tar.bz2
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>
Diffstat (limited to 'checks.c')
-rw-r--r--checks.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/checks.c b/checks.c
index e2690e9..fb3fc9c 100644
--- a/checks.c
+++ b/checks.c
@@ -892,7 +892,7 @@ static void check_pci_device_bus_num(struct check *c, struct dt_info *dti, struc
} else {
cells = (cell_t *)prop->val.val;
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))
FAIL_PROP(c, dti, node, prop, "PCI bus number %d out of range, expected (%d - %d)",