From 69595a167f06c4482ce784e30df1ac9b16ceb5b0 Mon Sep 17 00:00:00 2001 From: Thierry Reding Date: Tue, 29 Jun 2021 13:43:04 +0200 Subject: [PATCH] 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 Message-Id: <20210629114304.2451114-1-thierry.reding@gmail.com> Signed-off-by: David Gibson --- checks.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)",