Skip to content

Commit 3b9552c

Browse files
committed
Merge branch 'for-next/psci' into for-next/core
* for-next/psci: firmware: psci: Fix refcount leak in psci_dt_init
2 parents 3557a45 + 7ff37d2 commit 3b9552c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/firmware/psci/psci.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -804,8 +804,10 @@ int __init psci_dt_init(void)
804804

805805
np = of_find_matching_node_and_match(NULL, psci_of_match, &matched_np);
806806

807-
if (!np || !of_device_is_available(np))
807+
if (!np || !of_device_is_available(np)) {
808+
of_node_put(np);
808809
return -ENODEV;
810+
}
809811

810812
init_fn = (psci_initcall_t)matched_np->data;
811813
ret = init_fn(np);

0 commit comments

Comments
 (0)