summaryrefslogtreecommitdiff
path: root/drivers/media/dvb-frontends/mb86a20s.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-01-14 17:16:07 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-01-22 14:12:31 +0400
commitfd53744efea8bf845dc54bd3095be6203b1b07a1 (patch)
tree402a139468164022686652fc14f4a3c542f11c9a /drivers/media/dvb-frontends/mb86a20s.c
parenta77cfcac79c7b171d344e2bc0f05c075bc1fcfb2 (diff)
downloadlinux-fd53744efea8bf845dc54bd3095be6203b1b07a1.tar.xz
[media] mb86a20s: Fix i2c gate on error
If an error happens, restore tuner I2C gate to the right value. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb-frontends/mb86a20s.c')
-rw-r--r--drivers/media/dvb-frontends/mb86a20s.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/media/dvb-frontends/mb86a20s.c b/drivers/media/dvb-frontends/mb86a20s.c
index 4ff3a0c9d977..3c8587e38a05 100644
--- a/drivers/media/dvb-frontends/mb86a20s.c
+++ b/drivers/media/dvb-frontends/mb86a20s.c
@@ -262,10 +262,10 @@ static int mb86a20s_initfe(struct dvb_frontend *fe)
goto err;
}
+err:
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
-err:
if (rc < 0) {
state->need_init = true;
printk(KERN_INFO "mb86a20s: Init failed. Will try again later\n");
@@ -363,6 +363,10 @@ static int mb86a20s_set_frontend(struct dvb_frontend *fe)
dprintk("\n");
+ /*
+ * Gate should already be opened, but it doesn't hurt to
+ * double-check
+ */
if (fe->ops.i2c_gate_ctrl)
fe->ops.i2c_gate_ctrl(fe, 1);
dprintk("Calling tuner set parameters\n");