From f298917ccd7cd74c18668b6a8f4b71b1bc518cd5 Mon Sep 17 00:00:00 2001 From: Patrick Boettcher Date: Sun, 14 Aug 2005 15:31:24 +0000 Subject: FIX: check if the callback is set, before calling it Signed-off-by: Patrick Boettcher --- linux/drivers/media/dvb/frontends/lgdt330x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'linux/drivers/media/dvb/frontends/lgdt330x.c') diff --git a/linux/drivers/media/dvb/frontends/lgdt330x.c b/linux/drivers/media/dvb/frontends/lgdt330x.c index 58bad7338..9d2e9940a 100644 --- a/linux/drivers/media/dvb/frontends/lgdt330x.c +++ b/linux/drivers/media/dvb/frontends/lgdt330x.c @@ -378,12 +378,14 @@ static int lgdt330x_set_parameters(struct dvb_frontend* fe, /* Select the requested mode */ i2c_write_demod_bytes(state, top_ctrl_cfg, sizeof(top_ctrl_cfg)); - state->config->set_ts_params(fe, 0); + if (state->config->set_ts_params) + state->config->set_ts_params(fe, 0); state->current_modulation = param->u.vsb.modulation; } /* Tune to the specified frequency */ - state->config->pll_set(fe, param); + if (state->config->pll_set) + state->config->pll_set(fe, param); /* Keep track of the new frequency */ /* FIXME this is the wrong way to do this... */ -- cgit v1.2.3