Skip to content

Commit e687669

Browse files
committed
[media] dvb_frontend: better handle lna set errors
If an attempt to set LNA fails, restore the cache to LNA_AUTO, in order to make it to reflect the current LNA status. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
1 parent 52f7b00 commit e687669

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/media/dvb-core/dvb_frontend.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1882,6 +1882,8 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
18821882
c->lna = tvp->u.data;
18831883
if (fe->ops.set_lna)
18841884
r = fe->ops.set_lna(fe);
1885+
if (r < 0)
1886+
c->lna = LNA_AUTO;
18851887
break;
18861888

18871889
default:

0 commit comments

Comments
 (0)