diff options
author | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2008-03-20 01:35:15 +0100 |
---|---|---|
committer | Hartmut Hackmann <hartmut.hackmann@t-online.de> | 2008-03-20 01:35:15 +0100 |
commit | 03ce4f2e40560c24703b1f60c0adda58500adf38 (patch) | |
tree | df5ece5d9aaf929855a52c75fcf9925c69151050 /linux/drivers/media/video | |
parent | a20df5d7ad8c9de85bf67ed58f97132b4ffb7ba1 (diff) | |
download | mediapointer-dvb-s2-03ce4f2e40560c24703b1f60c0adda58500adf38.tar.gz mediapointer-dvb-s2-03ce4f2e40560c24703b1f60c0adda58500adf38.tar.bz2 |
saa7134: add number of devices check
From: Alan McIvor <alan.mcivor@reveal.co.nz>
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>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r-- | linux/drivers/media/video/saa7134/saa7134-core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/linux/drivers/media/video/saa7134/saa7134-core.c b/linux/drivers/media/video/saa7134/saa7134-core.c index 181936e2e..7296eeba0 100644 --- a/linux/drivers/media/video/saa7134/saa7134-core.c +++ b/linux/drivers/media/video/saa7134/saa7134-core.c @@ -962,6 +962,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; |