aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/tuners')
-rw-r--r--drivers/media/tuners/tda18212.c6
-rw-r--r--drivers/media/tuners/tda18218.c6
2 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/tuners/tda18212.c b/drivers/media/tuners/tda18212.c
index 5d9f02842501..e4a84ee231cf 100644
--- a/drivers/media/tuners/tda18212.c
+++ b/drivers/media/tuners/tda18212.c
@@ -277,7 +277,7 @@ struct dvb_frontend *tda18212_attach(struct dvb_frontend *fe,
277{ 277{
278 struct tda18212_priv *priv = NULL; 278 struct tda18212_priv *priv = NULL;
279 int ret; 279 int ret;
280 u8 uninitialized_var(val); 280 u8 val;
281 281
282 priv = kzalloc(sizeof(struct tda18212_priv), GFP_KERNEL); 282 priv = kzalloc(sizeof(struct tda18212_priv), GFP_KERNEL);
283 if (priv == NULL) 283 if (priv == NULL)
@@ -296,8 +296,8 @@ struct dvb_frontend *tda18212_attach(struct dvb_frontend *fe,
296 if (fe->ops.i2c_gate_ctrl) 296 if (fe->ops.i2c_gate_ctrl)
297 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */ 297 fe->ops.i2c_gate_ctrl(fe, 0); /* close I2C-gate */
298 298
299 dev_dbg(&priv->i2c->dev, "%s: ret=%d chip id=%02x\n", __func__, ret, 299 if (!ret)
300 val); 300 dev_dbg(&priv->i2c->dev, "%s: chip id=%02x\n", __func__, val);
301 if (ret || val != 0xc7) { 301 if (ret || val != 0xc7) {
302 kfree(priv); 302 kfree(priv);
303 return NULL; 303 return NULL;
diff --git a/drivers/media/tuners/tda18218.c b/drivers/media/tuners/tda18218.c
index 18198537be9f..2d31aeb6b088 100644
--- a/drivers/media/tuners/tda18218.c
+++ b/drivers/media/tuners/tda18218.c
@@ -277,7 +277,7 @@ struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe,
277 struct i2c_adapter *i2c, struct tda18218_config *cfg) 277 struct i2c_adapter *i2c, struct tda18218_config *cfg)
278{ 278{
279 struct tda18218_priv *priv = NULL; 279 struct tda18218_priv *priv = NULL;
280 u8 uninitialized_var(val); 280 u8 val;
281 int ret; 281 int ret;
282 /* chip default registers values */ 282 /* chip default registers values */
283 static u8 def_regs[] = { 283 static u8 def_regs[] = {
@@ -302,8 +302,8 @@ struct dvb_frontend *tda18218_attach(struct dvb_frontend *fe,
302 302
303 /* check if the tuner is there */ 303 /* check if the tuner is there */
304 ret = tda18218_rd_reg(priv, R00_ID, &val); 304 ret = tda18218_rd_reg(priv, R00_ID, &val);
305 dev_dbg(&priv->i2c->dev, "%s: ret=%d chip id=%02x\n", __func__, ret, 305 if (!ret)
306 val); 306 dev_dbg(&priv->i2c->dev, "%s: chip id=%02x\n", __func__, val);
307 if (ret || val != def_regs[R00_ID]) { 307 if (ret || val != def_regs[R00_ID]) {
308 kfree(priv); 308 kfree(priv);
309 return NULL; 309 return NULL;