[media] dvb_frontend: better handle lna set errors
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Sun, 16 Feb 2014 09:36:17 +0000 (06:36 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Mar 2014 17:19:34 +0000 (14:19 -0300)
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>
drivers/media/dvb-core/dvb_frontend.c

index 1f925e856974936914a7fdb5299bda2a4a84bd59..2d32c13ade7bcdfbd82492fc7511094f34c74a4f 100644 (file)
@@ -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: