Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 27e833da authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen
Browse files

scsi: megaraid: silence a static checker bug



If we had more than 32 megaraid cards then it would cause memory
corruption.  That's not likely, of course, but it's handy to enforce it
and make the static checker happy.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent c09a21d8
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -4199,6 +4199,9 @@ megaraid_probe_one(struct pci_dev *pdev, const struct pci_device_id *id)
	int irq, i, j;
	int error = -ENODEV;

	if (hba_count >= MAX_CONTROLLERS)
		goto out;

	if (pci_enable_device(pdev))
		goto out;
	pci_set_master(pdev);