aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/dvb/dvb-core/dvbdev.c5
-rw-r--r--drivers/media/video/v4l1-compat.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-core/dvbdev.c b/drivers/media/dvb/dvb-core/dvbdev.c
index 65d69665f1fc..6a32680dbb1b 100644
--- a/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/drivers/media/dvb/dvb-core/dvbdev.c
@@ -79,6 +79,10 @@ static int dvb_device_open(struct inode *inode, struct file *file)
79 file->private_data = dvbdev; 79 file->private_data = dvbdev;
80 old_fops = file->f_op; 80 old_fops = file->f_op;
81 file->f_op = fops_get(dvbdev->fops); 81 file->f_op = fops_get(dvbdev->fops);
82 if (file->f_op == NULL) {
83 file->f_op = old_fops;
84 goto fail;
85 }
82 if(file->f_op->open) 86 if(file->f_op->open)
83 err = file->f_op->open(inode,file); 87 err = file->f_op->open(inode,file);
84 if (err) { 88 if (err) {
@@ -90,6 +94,7 @@ static int dvb_device_open(struct inode *inode, struct file *file)
90 unlock_kernel(); 94 unlock_kernel();
91 return err; 95 return err;
92 } 96 }
97fail:
93 up_read(&minor_rwsem); 98 up_read(&minor_rwsem);
94 unlock_kernel(); 99 unlock_kernel();
95 return -ENODEV; 100 return -ENODEV;
diff --git a/drivers/media/video/v4l1-compat.c b/drivers/media/video/v4l1-compat.c
index d450cab20be4..b617bf05e2d7 100644
--- a/drivers/media/video/v4l1-compat.c
+++ b/drivers/media/video/v4l1-compat.c
@@ -203,7 +203,6 @@ static int poll_one(struct file *file, struct poll_wqueues *pwq)
203 table = &pwq->pt; 203 table = &pwq->pt;
204 for (;;) { 204 for (;;) {
205 int mask; 205 int mask;
206 set_current_state(TASK_INTERRUPTIBLE);
207 mask = file->f_op->poll(file, table); 206 mask = file->f_op->poll(file, table);
208 if (mask & POLLIN) 207 if (mask & POLLIN)
209 break; 208 break;
@@ -212,9 +211,8 @@ static int poll_one(struct file *file, struct poll_wqueues *pwq)
212 retval = -ERESTARTSYS; 211 retval = -ERESTARTSYS;
213 break; 212 break;
214 } 213 }
215 schedule(); 214 poll_schedule(pwq, TASK_INTERRUPTIBLE);
216 } 215 }
217 set_current_state(TASK_RUNNING);
218 poll_freewait(pwq); 216 poll_freewait(pwq);
219 return retval; 217 return retval;
220} 218}