From: Ard Biesheuvel Date: Wed, 1 Aug 2018 09:48:33 +0000 (+0200) Subject: tee: optee: take DT status property into account X-Git-Tag: v4.20-rc1~64^2~20^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db878f76b9ff7487da9bb0f686153f81829f1230;p=thirdparty%2Fkernel%2Flinux.git 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. Signed-off-by: Ard Biesheuvel Signed-off-by: Jens Wiklander --- diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index e5fd5ed217dac..69ea1efbb051d 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);