diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index aa1dbf800..dfaee4e15 100755 --- a/drivers/misc/fastrpc.c +++ b/drivers/misc/fastrpc.c @@ -995,11 +995,6 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, err = wait_for_completion_interruptible(&ctx->work); } - if (err) - goto bail; - - /* Check the response from remote dsp */ - err = ctx->retval; if (err) goto bail; @@ -1012,6 +1007,11 @@ static int fastrpc_internal_invoke(struct fastrpc_user *fl, u32 kernel, goto bail; } + /* Check the response from remote dsp */ + err = ctx->retval; + if (err) + goto bail; + bail: if (err != -ERESTARTSYS && err != -ETIMEDOUT) { /* We are done with this compute context */