Skip to contentSkip to conversation

media: mxl5xx: fix tuning logic

PATCH RESEND New Daniel Scheller 1 participant 1 message Oct 15, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND 1/1 media: mxl5xx: fix tuning logic

From: Mauro Carvalho Chehab <[email protected]>

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.

---
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(-)
drivers/media/dvb-frontends/mxl5xx.c +1 -8
index 676c96c216c3..4b449a6943c5 100644
@@ -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)
Signature · 1 line
2.13.6