summaryrefslogtreecommitdiff
path: root/linux/drivers/media/common/tuners/tda827x.c
diff options
context:
space:
mode:
authorMichael Krufky <mkrufky@linuxtv.org>2008-06-05 08:53:08 -0400
committerMichael Krufky <mkrufky@linuxtv.org>2008-06-05 08:53:08 -0400
commitc947470ba24a5e6c98288255e85880a6ba0c82aa (patch)
tree023674cdf983f83df2b19a70b79da7d812524b2c /linux/drivers/media/common/tuners/tda827x.c
parent0f339fedba49b4571e77a6e9eada52f4101750a2 (diff)
downloadmediapointer-dvb-s2-c947470ba24a5e6c98288255e85880a6ba0c82aa.tar.gz
mediapointer-dvb-s2-c947470ba24a5e6c98288255e85880a6ba0c82aa.tar.bz2
tda827x: fix NULL pointer in tda827xa_lna_gain
From: Sigmund Augdal <sigmund@snap.tv> Check that tda827x_config is defined before attempting to use it. Signed-off-by: Sigmund Augdal <sigmund@snap.tv> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/common/tuners/tda827x.c')
-rw-r--r--linux/drivers/media/common/tuners/tda827x.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/linux/drivers/media/common/tuners/tda827x.c b/linux/drivers/media/common/tuners/tda827x.c
index 2d39f9be5..763b0dd95 100644
--- a/linux/drivers/media/common/tuners/tda827x.c
+++ b/linux/drivers/media/common/tuners/tda827x.c
@@ -419,13 +419,13 @@ static void tda827xa_lna_gain(struct dvb_frontend *fe, int high,
unsigned char buf[] = {0x22, 0x01};
int arg;
int gp_func;
- struct i2c_msg msg = { .addr = priv->cfg->switch_addr, .flags = 0,
- .buf = buf, .len = sizeof(buf) };
+ struct i2c_msg msg = { .flags = 0, .buf = buf, .len = sizeof(buf) };
if (NULL == priv->cfg) {
dprintk("tda827x_config not defined, cannot set LNA gain!\n");
return;
}
+ msg.addr = priv->cfg->switch_addr;
if (priv->cfg->config) {
if (high)
dprintk("setting LNA to high gain\n");