diff options
author | Alan McIvor <alan.mcivor@reveal.co.nz> | 2008-04-22 14:46:09 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 14:07:52 -0300 |
commit | a4df8e1d6ae460546dfa3b4f23a85cb5a4255109 (patch) | |
tree | 00ed87d1051b40edd11cf8ea57c197ea0b01bc86 /drivers/media/video/saa7134 | |
parent | 7bff4b4d3ad2b9ff42b4087f409076035af1d165 (diff) | |
download | linux-a4df8e1d6ae460546dfa3b4f23a85cb5a4255109.tar.gz linux-a4df8e1d6ae460546dfa3b4f23a85cb5a4255109.tar.bz2 linux-a4df8e1d6ae460546dfa3b4f23a85cb5a4255109.zip |
V4L/DVB (7394): saa7134: add number of devices check
This patch fixes reported problems when trying to add a 9th device into a
system.
Signed-off-by: Alan McIvor <alan.mcivor@reveal.co.nz>
Signed-off-by: Hartmut Hackmann <hartmut.hackmann@t-online.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/saa7134')
-rw-r--r-- | drivers/media/video/saa7134/saa7134-core.c | 3 |
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 599273894f34..eec127864fe3 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; |