Skip to content

Commit

Permalink
V4L/DVB (3741): Budget-core doesn't check if register adapter fails
Browse files Browse the repository at this point in the history
If you have more than DVB_MAX_ADAPTERS in your machine, this causes an oops.

Signed-off-by: Andrew de Quincey <adq_dvb@lidskialf.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Andrew de Quincey authored and Mauro Carvalho Chehab committed Jun 25, 2006
1 parent 0dbbc0a commit dcdda65
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/media/dvb/ttpci/budget-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,9 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
budget->dev->name, budget->buffer_width, budget->buffer_height);
printk("%s: dma buffer size %u\n", budget->dev->name, budget->buffer_size);

dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner);
if ((ret = dvb_register_adapter(&budget->dvb_adapter, budget->card->name, owner)) < 0) {
return ret;
}

/* set dd1 stream a & b */
saa7146_write(dev, DD1_STREAM_B, 0x00000000);
Expand Down

0 comments on commit dcdda65

Please sign in to comment.