diff options
author | Daniel Scheller <d.scheller@gmx.net> | 2017-08-20 06:29:14 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2017-08-20 07:29:10 -0400 |
commit | f0e72c29fd063aca325afee25a6f9bcc22871837 (patch) | |
tree | b940db6e2dcb7096ea9557c1f80e1c74058f74dd /drivers | |
parent | 6185a573851487d7044eecda39d5bfc77cf5d8ad (diff) | |
download | linux-f0e72c29fd063aca325afee25a6f9bcc22871837.tar.bz2 |
media: dvb-frontends/stv0910: fix FE_HAS_LOCK check order in tune()
It should first read the status and then check if FE has lock.
Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/dvb-frontends/stv0910.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/dvb-frontends/stv0910.c b/drivers/media/dvb-frontends/stv0910.c index 45d94c3a29f2..e87a3ee6155c 100644 --- a/drivers/media/dvb-frontends/stv0910.c +++ b/drivers/media/dvb-frontends/stv0910.c @@ -1581,13 +1581,15 @@ static int tune(struct dvb_frontend *fe, bool re_tune, return r; state->tune_time = jiffies; } - if (*status & FE_HAS_LOCK) - return 0; - *delay = HZ; r = read_status(fe, status); if (r) return r; + + if (*status & FE_HAS_LOCK) + return 0; + *delay = HZ; + return 0; } |