Skip to content

Commit

Permalink
V4L/DVB (7394): saa7134: add number of devices check
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan McIvor authored and Mauro Carvalho Chehab committed Apr 24, 2008
1 parent 7bff4b4 commit a4df8e1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/media/video/saa7134/saa7134-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a4df8e1

Please sign in to comment.