Skip to content
Snippets Groups Projects
Commit 25633d1f authored by Wei Yongjun's avatar Wei Yongjun Committed by Greg Kroah-Hartman
Browse files

greybus: arche-platform: Add missing of_node_put() in arche_platform_change_state()


This node pointer is returned by of_find_compatible_node() with
refcount incremented in this function. of_node_put() on it before
exitting this function.

This is detected by Coccinelle semantic patch.

Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
Acked-by: default avatarJohan Hovold <johan@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cf55902b
Branches
Tags
No related merge requests found
...@@ -128,6 +128,7 @@ int arche_platform_change_state(enum arche_platform_state state, ...@@ -128,6 +128,7 @@ int arche_platform_change_state(enum arche_platform_state state,
pdev = of_find_device_by_node(np); pdev = of_find_device_by_node(np);
if (!pdev) { if (!pdev) {
pr_err("arche-platform device not found\n"); pr_err("arche-platform device not found\n");
of_node_put(np);
return -ENODEV; return -ENODEV;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment