summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-02-16 13:36:17 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-03-04 21:19:34 +0400
commite6876692ca86f1aacccec42fc68f628a8f2a022b (patch)
tree1395be3886393938b47f9becc19c1b0fb37673f6 /drivers
parent52f7b00e645b2c85020bca2cc3dc720ab7f93ac0 (diff)
downloadlinux-e6876692ca86f1aacccec42fc68f628a8f2a022b.tar.xz
[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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb-core/dvb_frontend.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/dvb-core/dvb_frontend.c b/drivers/media/dvb-core/dvb_frontend.c
index 1f925e856974..2d32c13ade7b 100644
--- a/drivers/media/dvb-core/dvb_frontend.c
+++ b/drivers/media/dvb-core/dvb_frontend.c
@@ -1882,6 +1882,8 @@ static int dtv_property_process_set(struct dvb_frontend *fe,
c->lna = tvp->u.data;
if (fe->ops.set_lna)
r = fe->ops.set_lna(fe);
+ if (r < 0)
+ c->lna = LNA_AUTO;
break;
default: