aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/saa7134/saa7134-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/video/saa7134/saa7134-core.c b/drivers/media/video/saa7134/saa7134-core.c
index 599273894f3..eec127864fe 100644
--- a/drivers/media/video/saa7134/saa7134-core.c
+++ b/drivers/media/video/saa7134/saa7134-core.c
@@ -866,6 +866,9 @@ static int __devinit saa7134_initdev(struct pci_dev *pci_dev,
int err;
int mask;
+ if (saa7134_devcount == SAA7134_MAXBOARDS)
+ return -ENOMEM;
+
dev = kzalloc(sizeof(*dev),GFP_KERNEL);
if (NULL == dev)
return -ENOMEM;