upstream: [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)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:54:48 +0000 (11:54 +0900)
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 1f925e8..2d32c13 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: