diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 34dce850067b9e9c379274ef8b3c91da4bb42ef0..2f254f957b0af3df3c7d2e64dba1cbbc57a24f3c 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -696,8 +696,10 @@ static int __init optee_driver_init(void) return -ENODEV; np = of_find_matching_node(fw_np, optee_match); - if (!np || !of_device_is_available(np)) + if (!np || !of_device_is_available(np)) { + of_node_put(np); return -ENODEV; + } optee = optee_probe(np); of_node_put(np);