summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index ebc550147..2f7594734 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -268,8 +268,14 @@ int dvb_frontend_get_event (struct dvb_frontend_data *fe,
if (flags & O_NONBLOCK)
return -EWOULDBLOCK;
+ up(&fe->sem);
+
ret = wait_event_interruptible (events->wait_queue,
events->eventw != events->eventr);
+
+ if (down_interruptible (&fe->sem))
+ return -ERESTARTSYS;
+
if (ret < 0)
return ret;
}