Skip to content

Commit 3cd3059

Browse files
Emantorherbertx
authored andcommitted
hwrng: optee - simplify OP-TEE context match
Simplify the TEE implementor ID match by returning the boolean expression directly instead of going through an if/else. Signed-off-by: Rouven Czerwinski <rouven.czerwinski@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 90f7520 commit 3cd3059

1 file changed

Lines changed: 1 addition & 4 deletions

File tree

drivers/char/hw_random/optee-rng.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -205,10 +205,7 @@ static int get_optee_rng_info(struct device *dev)
205205

206206
static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
207207
{
208-
if (ver->impl_id == TEE_IMPL_ID_OPTEE)
209-
return 1;
210-
else
211-
return 0;
208+
return (ver->impl_id == TEE_IMPL_ID_OPTEE);
212209
}
213210

214211
static int optee_rng_probe(struct device *dev)

0 commit comments

Comments
 (0)