From: Jens Wiklander Date: Mon, 25 Jan 2021 09:36:57 +0000 (+0100) Subject: tee: optee: remove need_resched() before cond_resched() X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=958567600517fd15b7f35ca1a8be0104f0eb0686;p=uclinux-h8%2Flinux.git tee: optee: remove need_resched() before cond_resched() Testing need_resched() before cond_resched() is not needed as an equivalent test is done internally in cond_resched(). So drop the need_resched() test. Fixes: dcb3b06d9c34 ("tee: optee: replace might_sleep with cond_resched") Reviewed-by: Rouven Czerwinski Tested-by: Rouven Czerwinski Tested-by: Sumit Garg Acked-by: Arnd Bergmann Signed-off-by: Jens Wiklander --- diff --git a/drivers/tee/optee/call.c b/drivers/tee/optee/call.c index 780d7c4fd756..7a77e375b503 100644 --- a/drivers/tee/optee/call.c +++ b/drivers/tee/optee/call.c @@ -149,8 +149,7 @@ u32 optee_do_call_with_arg(struct tee_context *ctx, phys_addr_t parg) */ optee_cq_wait_for_completion(&optee->call_queue, &w); } else if (OPTEE_SMC_RETURN_IS_RPC(res.a0)) { - if (need_resched()) - cond_resched(); + cond_resched(); param.a0 = res.a0; param.a1 = res.a1; param.a2 = res.a2;