Commit acfd4aae authored by Mark Hounschell's avatar Mark Hounschell Committed by Greg Kroah-Hartman

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

Insure we don't allow configuring more than MAXBOARDS (32).
Signed-off-by: default avatarMark Hounschell <markh@compro.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c3b48d9
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment