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:
parent
5c3b48d9b9
commit
acfd4aae9e
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user