aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/gcx/gcioctl/gcif.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/gcx/gcioctl/gcif.c b/drivers/misc/gcx/gcioctl/gcif.c
index 971883e..3085d8b 100644
--- a/drivers/misc/gcx/gcioctl/gcif.c
+++ b/drivers/misc/gcx/gcioctl/gcif.c
@@ -766,11 +766,13 @@ static int gc_callback_wait(struct gccmdcallbackwait *gccmdcallbackwait)
: msecs_to_jiffies(cpcmdcallbackwait.timeoutms);
/* Wait until a callback is triggered. */
- GCWAIT_FOR_COMPLETION_TIMEOUT(timeout,
- &gccallbackhandle->ready,
- timeout);
+ timeout = wait_for_completion_interruptible_timeout(
+ &gccallbackhandle->ready, timeout);
- if (timeout == 0) {
+ if (timeout < 0)
+ ret = timeout;
+
+ else if (timeout == 0) {
cpcmdcallbackwait.gcerror = GCERR_TIMEOUT;
cpcmdcallbackwait.callback = NULL;
cpcmdcallbackwait.callbackparam = NULL;