V4L/DVB (11668): ivtv: fix compiler warning.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Hans Verkuil 2009-05-02 07:56:46 -03:00 committed by Mauro Carvalho Chehab
parent 52c3d29cfa
commit 34a7864db1
1 changed files with 6 additions and 3 deletions

View File

@ -305,14 +305,17 @@ int ivtv_waitq(wait_queue_head_t *waitq)
/* Generic utility functions */
int ivtv_msleep_timeout(unsigned int msecs, int intr)
{
int ret;
int timeout = msecs_to_jiffies(msecs);
do {
set_current_state(intr ? TASK_INTERRUPTIBLE : TASK_UNINTERRUPTIBLE);
timeout = schedule_timeout(timeout);
if (intr && (ret = signal_pending(current)))
if (intr) {
int ret = signal_pending(current);
if (ret)
return ret;
}
} while (timeout);
return 0;
}