Message ID | 20191009144123.24583-4-srinivas.kandagatla@linaro.org (mailing list archive) |
---|---|
State | Accepted |
Commit | 55bcda35584c995d2544902e77c2ad5bee6e729b |
Headers | show |
Series | misc: fastrpc: fixes and map/unmap support | expand |
diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index c0fe3419c685..666c431380ce 100644 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -959,8 +959,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;