All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH RESEND] media: mxl5xx: fix tuning logic
@ 2017-10-15 18:54 Daniel Scheller
  0 siblings, 0 replies; only message in thread
From: Daniel Scheller @ 2017-10-15 18:54 UTC (permalink / raw)
  To: linux-media, mchehab, mchehab

From: Mauro Carvalho Chehab <mchehab@s-opensource.com>

The tuning logic is broken with regards to status report:
it relies on a previously-cached value that may not be valid
if retuned.

Change the logic to always read the status.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: Daniel Scheller <d.scheller@gmx.net>
---
Resend (ref. https://patchwork.linuxtv.org/patch/43541/) so this doesn't
get lost - this fix really should go in.

 drivers/media/dvb-frontends/mxl5xx.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/media/dvb-frontends/mxl5xx.c b/drivers/media/dvb-frontends/mxl5xx.c
index 676c96c216c3..4b449a6943c5 100644
--- a/drivers/media/dvb-frontends/mxl5xx.c
+++ b/drivers/media/dvb-frontends/mxl5xx.c
@@ -636,16 +636,9 @@ static int tune(struct dvb_frontend *fe, bool re_tune,
 		if (r)
 			return r;
 		state->tune_time = jiffies;
-		return 0;
 	}
-	if (*status & FE_HAS_LOCK)
-		return 0;
 
-	r = read_status(fe, status);
-	if (r)
-		return r;
-
-	return 0;
+	return read_status(fe, status);
 }
 
 static enum fe_code_rate conv_fec(enum MXL_HYDRA_FEC_E fec)
-- 
2.13.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2017-10-15 18:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-15 18:54 [PATCH RESEND] media: mxl5xx: fix tuning logic Daniel Scheller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.