diff options
author | Mark Hounschell <markh@compro.net> | 2014-04-25 13:10:20 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-05-16 12:18:24 -0700 |
commit | acfd4aae9e782bb5b1dde844247cda01e3256cd2 (patch) | |
tree | 5eb8f8809a3bfd598960ace0ef03b7c912b984e4 /drivers/staging/dgap | |
parent | 5c3b48d9b99c4a135f27b08cf3d51dfae4cf7e59 (diff) |
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>
Diffstat (limited to 'drivers/staging/dgap')
-rw-r--r-- | drivers/staging/dgap/dgap.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index b834c83da930..f597432ede8c 100644 --- a/drivers/staging/dgap/dgap.c +++ b/drivers/staging/dgap/dgap.c @@ -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); |