summaryrefslogtreecommitdiff
path: root/drivers/media/pci/dm1105/dm1105.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/pci/dm1105/dm1105.c')
-rw-r--r--drivers/media/pci/dm1105/dm1105.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/pci/dm1105/dm1105.c b/drivers/media/pci/dm1105/dm1105.c
index c9db108751a7..1ddb0576fb7b 100644
--- a/drivers/media/pci/dm1105/dm1105.c
+++ b/drivers/media/pci/dm1105/dm1105.c
@@ -986,6 +986,9 @@ static int dm1105_probe(struct pci_dev *pdev,
int ret = -ENOMEM;
int i;
+ if (dm1105_devcount >= ARRAY_SIZE(card))
+ return -ENODEV;
+
dev = kzalloc(sizeof(struct dm1105_dev), GFP_KERNEL);
if (!dev)
return -ENOMEM;