diff options
author | Will Deacon <will@kernel.org> | 2025-05-27 12:26:22 +0100 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2025-05-27 12:26:22 +0100 |
commit | 3b9552cf340ef4f6e2ff8b612f3e47c31a86aa1f (patch) | |
tree | 3497a90cb9d42de06e630228410c55f44975e1af /drivers/firmware/psci/psci.c | |
parent | 3557a45d2ab89211de1d367ff30af9e69c859aab (diff) | |
parent | 7ff37d29fd5c27617b9767e1b8946d115cf93a1e (diff) |
Merge branch 'for-next/psci' into for-next/core
* for-next/psci:
firmware: psci: Fix refcount leak in psci_dt_init
Diffstat (limited to 'drivers/firmware/psci/psci.c')
-rw-r--r-- | drivers/firmware/psci/psci.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/firmware/psci/psci.c b/drivers/firmware/psci/psci.c index a1ebbe9b73b1..38ca190d4a22 100644 --- a/drivers/firmware/psci/psci.c +++ b/drivers/firmware/psci/psci.c @@ -804,8 +804,10 @@ int __init psci_dt_init(void) np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np); - if (!np || !of_device_is_available(np)) + if (!np || !of_device_is_available(np)) { + of_node_put(np); return -ENODEV; + } init_fn = (psci_initcall_t)matched_np->data; ret = init_fn(np); |