diff mbox

[media] dvb-frontends/mxl5xx: fix lock check order

Message ID 20170820104545.6596-1-d.scheller.oss@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Scheller Aug. 20, 2017, 10:45 a.m. UTC
From: Daniel Scheller <d.scheller@gmx.net>

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
---
When the mxl5xx driver together with the ddbridge glue gets merged ([1]),
this one should go in aswell - this fix is part of the dddvb-0.9.31
release.

 drivers/media/dvb-frontends/mxl5xx.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/media/dvb-frontends/mxl5xx.c b/drivers/media/dvb-frontends/mxl5xx.c
index 676c96c216c3..d9136d67f5d4 100644
--- a/drivers/media/dvb-frontends/mxl5xx.c
+++ b/drivers/media/dvb-frontends/mxl5xx.c
@@ -638,13 +638,14 @@  static int tune(struct dvb_frontend *fe, bool re_tune,
 		state->tune_time = jiffies;
 		return 0;
 	}
-	if (*status & FE_HAS_LOCK)
-		return 0;
 
 	r = read_status(fe, status);
 	if (r)
 		return r;
 
+	if (*status & FE_HAS_LOCK)
+		return 0;
+
 	return 0;
 }