Message ID | 20190913152532.24484-4-jorge.ramirez-ortiz@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | misc: fastrpc: fixes and map/unmap support | expand |
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index bc03500bfe60..d2b639dfc461 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -927,8 +927,13 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, if (err) goto bail; - /* Wait for remote dsp to respond or time out */ - err = wait_for_completion_interruptible(&ctx->work); + if (kernel) { + if (!wait_for_completion_timeout(&ctx->work, 10 * HZ)) + err = -ETIMEDOUT; + } else { + err = wait_for_completion_interruptible(&ctx->work); + } + if (err) goto bail;