mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:04:51 +01:00
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>
This commit is contained in:
parent
90f7520b76
commit
3cd3059af1
1 changed files with 1 additions and 4 deletions
|
|
@ -205,10 +205,7 @@ static int get_optee_rng_info(struct device *dev)
|
|||
|
||||
static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
|
||||
{
|
||||
if (ver->impl_id == TEE_IMPL_ID_OPTEE)
|
||||
return 1;
|
||||
else
|
||||
return 0;
|
||||
return (ver->impl_id == TEE_IMPL_ID_OPTEE);
|
||||
}
|
||||
|
||||
static int optee_rng_probe(struct device *dev)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue