Insure we don't allow configuring more than MAXBOARDS (32). Signed-off-by: Mark Hounschell <markh@xxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/staging/dgap/dgap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/dgap/dgap.c b/drivers/staging/dgap/dgap.c index b834c83..f597432 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); -- 1.8.4.5 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel