diff options
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-core.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-core.c b/linux/drivers/media/video/cx88/cx88-core.c index f5c16de32..5edc9e9c2 100644 --- a/linux/drivers/media/video/cx88/cx88-core.c +++ b/linux/drivers/media/video/cx88/cx88-core.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-core.c,v 1.9 2004/09/15 16:15:24 kraxel Exp $ + * $Id: cx88-core.c,v 1.10 2004/09/16 07:05:48 kraxel Exp $ * * device driver for Conexant 2388x based TV cards * driver core @@ -207,6 +207,7 @@ int cx88_risc_buffer(struct pci_dev *pci, struct btcx_riscmem *risc, /* save pointer to jmp instruction address */ risc->jmp = rp; + BUG_ON((risc->jmp - risc->cpu + 2) / 4 > risc->size); return 0; } @@ -231,6 +232,7 @@ int cx88_risc_databuffer(struct pci_dev *pci, struct btcx_riscmem *risc, /* save pointer to jmp instruction address */ risc->jmp = rp; + BUG_ON((risc->jmp - risc->cpu + 2) / 4 > risc->size); return 0; } diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index 91c9ca206..c01317786 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -1,5 +1,5 @@ /* - $Id: cx88-i2c.c,v 1.11 2004/09/15 16:15:24 kraxel Exp $ + $Id: cx88-i2c.c,v 1.12 2004/09/16 07:05:48 kraxel Exp $ cx88-i2c.c -- all the i2c code is here @@ -96,7 +96,7 @@ static int attach_inform(struct i2c_client *client) dprintk(1, "i2c attach [client=%s]\n", i2c_clientname(client)); if (!client->driver->command) - return; + return 0; if (core->tuner_type != UNSET) client->driver->command(client, TUNER_SET_TYPE, &core->tuner_type); |