From: Mauro Carvalho Chehab Date: Sun, 16 Feb 2014 09:36:17 +0000 (-0300) Subject: [media] dvb_frontend: better handle lna set errors X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e6876692ca86f1aacccec42fc68f628a8f2a022b;p=openwrt%2Fstaging%2Fblogic.git [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 --- 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: