Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Rouven Czerwinski and committed by
Herbert Xu
3cd3059a 90f7520b

+1 -4
+1 -4
drivers/char/hw_random/optee-rng.c
··· 205 205 206 206 static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data) 207 207 { 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); 212 209 } 213 210 214 211 static int optee_rng_probe(struct device *dev)