Ver Fonte

[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>
Mauro Carvalho Chehab há 11 anos atrás
pai
commit
e6876692ca
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      drivers/media/dvb-core/dvb_frontend.c

+ 2 - 0
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: