From e6876692ca86f1aacccec42fc68f628a8f2a022b Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sun, 16 Feb 2014 06:36:17 -0300 Subject: [PATCH] [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 --- drivers/media/dvb-core/dvb_frontend.c | 2 ++ 1 file changed, 2 insertions(+) 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: -- 2.30.2