From: Michael Krufky Date: Wed, 9 Nov 2005 05:35:47 +0000 (-0800) Subject: [PATCH] dvb: nxt200x: check callback fix X-Git-Tag: v2.6.15-rc1~327 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6dd2d5d61b000509e3a7f6c06778b16a4ef10ba;p=linux-2.6 [PATCH] dvb: nxt200x: check callback fix Check that a callback (set_ts_params) is set before calling it. Signed-off-by: Michael Krufky Cc: Johannes Stezenbach Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c index 1d729be9b7..d1b9f8b9b4 100644 --- a/drivers/media/dvb/frontends/nxt200x.c +++ b/drivers/media/dvb/frontends/nxt200x.c @@ -557,14 +557,16 @@ static int nxt200x_setup_frontend_parameters (struct dvb_frontend* fe, case QAM_256: /* Set punctured clock for QAM */ /* This is just a guess since I am unable to test it */ - state->config->set_ts_params(fe, 1); + if (state->config->set_ts_params) + state->config->set_ts_params(fe, 1); /* set to use cable input */ buf[3] |= 0x08; break; case VSB_8: /* Set non-punctured clock for VSB */ - state->config->set_ts_params(fe, 0); + if (state->config->set_ts_params) + state->config->set_ts_params(fe, 0); break; default: return -EINVAL;