diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index fdae42f572b6ebffd2a7e3d67bc3b3f6ed982531..9e1c83e425edd30de0f8ee3b2c9a55743fc976be 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c @@ -639,7 +639,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic if (!orom) orom = isci_request_oprom(pdev); - for (i = 0; orom && i < ARRAY_SIZE(orom->ctrl); i++) { + for (i = 0; orom && i < num_controllers(pdev); i++) { if (sci_oem_parameters_validate(&orom->ctrl[i], orom->hdr.version)) { dev_warn(&pdev->dev,