aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2018-08-01 11:48:33 +0200
committerJens Wiklander <jens.wiklander@linaro.org>2018-11-06 09:47:42 +0100
commit4b70732f1b983e79e17b5bad0b7b67f3c220e6a7 (patch)
tree82c729d79b7929f8b572f30d81936efa1cedcdc4
parent1c08dfd2173a0df41722a7fb6b2ab04ec3730713 (diff)
tee: optee: take DT status property into account
DT nodes may have a 'status' property which, if set to anything other than 'ok' or 'okay', indicates to the OS that the DT node should be treated as if it was not present. So add that missing logic to the OP-TEE driver. Cherry-picked from v4.20-rc1: (db878f76b9ff "tee: optee: take DT status property into account") Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
-rw-r--r--drivers/tee/optee/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index e1aafe842d66..34dce850067b 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -696,7 +696,7 @@ static int __init optee_driver_init(void)
return -ENODEV;
np = of_find_matching_node(fw_np, optee_match);
- if (!np)
+ if (!np || !of_device_is_available(np))
return -ENODEV;
optee = optee_probe(np);