diff options
author | Alan McIvor <alan.mcivor@reveal.co.nz> | 2008-04-22 19:46:09 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-04-24 19:07:52 +0200 |
commit | a4df8e1d6ae460546dfa3b4f23a85cb5a4255109 (patch) | |
tree | 00ed87d1051b40edd11cf8ea57c197ea0b01bc86 /drivers/media/video | |
parent | V4L/DVB (7393): tda827x: fixed support of tuners with LNA (diff) | |
download | linux-a4df8e1d6ae460546dfa3b4f23a85cb5a4255109.tar.xz 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')
-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; |