aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/common
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/common')
-rw-r--r--drivers/media/common/tuners/tda8290.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/common/tuners/tda8290.c b/drivers/media/common/tuners/tda8290.c
index 4b8662edb7cb..39697fa59256 100644
--- a/drivers/media/common/tuners/tda8290.c
+++ b/drivers/media/common/tuners/tda8290.c
@@ -566,8 +566,11 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
566 u8 data; 566 u8 data;
567 struct i2c_msg msg = { .flags = I2C_M_RD, .buf = &data, .len = 1 }; 567 struct i2c_msg msg = { .flags = I2C_M_RD, .buf = &data, .len = 1 };
568 568
569 if (NULL == analog_ops->i2c_gate_ctrl) 569 if (!analog_ops->i2c_gate_ctrl) {
570 printk(KERN_ERR "tda8290: no gate control were provided!\n");
571
570 return -EINVAL; 572 return -EINVAL;
573 }
571 574
572 analog_ops->i2c_gate_ctrl(fe, 1); 575 analog_ops->i2c_gate_ctrl(fe, 1);
573 576
@@ -615,6 +618,7 @@ static int tda829x_find_tuner(struct dvb_frontend *fe)
615 618
616 if (ret != 1) { 619 if (ret != 1) {
617 tuner_warn("tuner access failed!\n"); 620 tuner_warn("tuner access failed!\n");
621 analog_ops->i2c_gate_ctrl(fe, 0);
618 return -EREMOTEIO; 622 return -EREMOTEIO;
619 } 623 }
620 624