Skip to content

Commit

Permalink
V4L/DVB (3320): Check if PLL-description is set
Browse files Browse the repository at this point in the history
- Check if in the dvb-usb-device-structure the dvb_pll_desc is set before use.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
  • Loading branch information
Patrick Boettcher authored and Mauro Carvalho Chehab committed Jan 9, 2006
1 parent 4e5910e commit a6bab88
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,8 @@ int dvb_usb_pll_init_i2c(struct dvb_frontend *fe)
struct i2c_msg msg = { .addr = d->pll_addr, .flags = 0, .buf = d->pll_init, .len = 4 };
int ret = 0;

/* if there is nothing to initialize */
if (d->pll_init[0] == 0x00 && d->pll_init[1] == 0x00 &&
d->pll_init[2] == 0x00 && d->pll_init[3] == 0x00)
/* if pll_desc is not used */
if (d->pll_desc == NULL)
return 0;

if (d->tuner_pass_ctrl)
Expand All @@ -80,6 +79,9 @@ int dvb_usb_pll_set(struct dvb_frontend *fe, struct dvb_frontend_parameters *fep
{
struct dvb_usb_device *d = fe->dvb->priv;

if (d->pll_desc == NULL)
return 0;

deb_pll("pll addr: %x, freq: %d %p\n",d->pll_addr,fep->frequency,d->pll_desc);

b[0] = d->pll_addr << 1;
Expand Down

0 comments on commit a6bab88

Please sign in to comment.