2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2025-01-16 09:34:22 +08:00

staging: dgap: Add check for MAXBOARDS in .probe (dgap_init_one)

Insure we don't allow configuring more than MAXBOARDS (32).

Signed-off-by: Mark Hounschell <markh@compro.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Mark Hounschell 2014-04-25 13:10:20 -04:00 committed by Greg Kroah-Hartman
parent 5c3b48d9b9
commit acfd4aae9e

View File

@ -572,6 +572,9 @@ static int dgap_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{
int rc;
if (dgap_NumBoards >= MAXBOARDS)
return -EPERM;
/* wake up and enable device */
rc = pci_enable_device(pdev);