From 0eedc7549609f71e02a8b19a8de555735912bef9 Mon Sep 17 00:00:00 2001 From: Adam Greloch Date: Mon, 7 Oct 2024 08:37:44 +0200 Subject: [PATCH] pc-ata: fix index bound in pci dev iteration JIRA: RTOS-922 --- storage/pc-ata/ata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/pc-ata/ata.c b/storage/pc-ata/ata.c index eb048253..4198f139 100644 --- a/storage/pc-ata/ata.c +++ b/storage/pc-ata/ata.c @@ -654,7 +654,7 @@ int ata_init(void) if (buses == NULL) { /* no buses found on common addresses. look through pci config BARs */ - for (i = 0; i < sizeof(pci_devClasses); i++) { + for (i = 0; i < sizeof(pci_devClasses) / sizeof(pci_devClasses[0]); i++) { pctl.pci.id.vendor = PCI_ANY; pctl.pci.id.device = PCI_ANY; pctl.pci.id.subvendor = PCI_ANY;