aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/pvrusb2/pvrusb2-encoder.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/pvrusb2/pvrusb2-encoder.c')
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-encoder.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index 20b614436d2c..205087a3e136 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -209,6 +209,11 @@ static int pvr2_encoder_cmd(void *ctxt,
209 209
210 LOCK_TAKE(hdw->ctl_lock); do { 210 LOCK_TAKE(hdw->ctl_lock); do {
211 211
212 if (!hdw->flag_encoder_ok) {
213 ret = -EIO;
214 break;
215 }
216
212 retry_flag = 0; 217 retry_flag = 0;
213 try_count++; 218 try_count++;
214 ret = 0; 219 ret = 0;
@@ -273,6 +278,7 @@ static int pvr2_encoder_cmd(void *ctxt,
273 ret = -EBUSY; 278 ret = -EBUSY;
274 } 279 }
275 if (ret) { 280 if (ret) {
281 hdw->flag_encoder_ok = 0;
276 pvr2_trace( 282 pvr2_trace(
277 PVR2_TRACE_ERROR_LEGS, 283 PVR2_TRACE_ERROR_LEGS,
278 "Giving up on command." 284 "Giving up on command."