aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-23 14:51:07 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-23 14:51:07 +0100
commita8c4bbbbbe2a4154ce307aba34884854a3cd030a (patch)
treec55b256ce1500293eecc4677f81b15b61d3280ac
parent233860e8e687f02d8a721ed8c974219996823fd0 (diff)
downloadv4l-utils-a8c4bbbbbe2a4154ce307aba34884854a3cd030a.tar.gz
dvbv5-zap: add a check for dvb_fe_retrieve_status() errors
If something goes wrong, just sleep and re-try inside the timeout loop. Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-rw-r--r--utils/dvb/dvbv5-zap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/dvb/dvbv5-zap.c b/utils/dvb/dvbv5-zap.c
index 534025bd..aab2daf8 100644
--- a/utils/dvb/dvbv5-zap.c
+++ b/utils/dvb/dvbv5-zap.c
@@ -501,6 +501,11 @@ static int check_frontend(struct arguments *args,
status = 0;
rc = dvb_fe_retrieve_stats(parms, DTV_STATUS, &status);
+ if (rc) {
+ ERROR("dvb_fe_retrieve_stats failed");
+ usleep(1000000);
+ continue;
+ }
if (!args->silent)
print_frontend_stats(stderr, args, parms);
if (status & FE_HAS_LOCK)