Skip to content

Commit

Permalink
[media] mb86a20s: Fix i2c gate on error
Browse files Browse the repository at this point in the history
If an error happens, restore tuner I2C gate to the right
value.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Mauro Carvalho Chehab committed Jan 22, 2013
1 parent a77cfca commit fd53744
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/media/dvb-frontends/mb86a20s.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down Expand Up @@ -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");
Expand Down

0 comments on commit fd53744

Please sign in to comment.