[PATCH 09/11] Correct wait_event_timeout error return check.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Steinar H. Gunderson" <sesse@xxxxxxxxxxxx>

wait_event_timeout() returns 0 on timeout, not -ERESTARTSYS.
Note that since this actually causes timeouts to be handled,
it makes the CA situation a lot worse without the next patch
in the series.
---
 drivers/media/dvb/mantis/mantis_hif.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/dvb/mantis/mantis_hif.c b/drivers/media/dvb/mantis/mantis_hif.c
index 6d42f73..a3ec2a2 100644
--- a/drivers/media/dvb/mantis/mantis_hif.c
+++ b/drivers/media/dvb/mantis/mantis_hif.c
@@ -47,7 +47,7 @@ static int mantis_hif_sbuf_opdone_wait(struct mantis_ca *ca)
 
 	if (wait_event_timeout(ca->hif_opdone_wq,
 			       test_and_clear_bit(MANTIS_SBUF_OPDONE_BIT, &ca->hif_event),
-			       msecs_to_jiffies(500)) == -ERESTARTSYS) {
+			       msecs_to_jiffies(500)) == 0) {
 
 		dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Smart buffer operation timeout !", mantis->num);
 		rc = -EREMOTEIO;
@@ -63,7 +63,7 @@ static int mantis_hif_write_wait(struct mantis_ca *ca)
 
 	if (wait_event_timeout(ca->hif_write_wq,
 			       test_and_clear_bit(MANTIS_GPIF_WRACK_BIT, &mantis->gpif_status),
-			       msecs_to_jiffies(500)) == -ERESTARTSYS) {
+			       msecs_to_jiffies(500)) == 0) {
 
 		dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write ACK timed out !", mantis->num);
 		rc = -EREMOTEIO;
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux