Skip to content

Commit 25633d1

Browse files
Wei Yongjungregkh
authored andcommitted
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: Wei Yongjun <[email protected]> Acked-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cf55902 commit 25633d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/staging/greybus/arche-platform.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ int arche_platform_change_state(enum arche_platform_state state,
128128
pdev = of_find_device_by_node(np);
129129
if (!pdev) {
130130
pr_err("arche-platform device not found\n");
131+
of_node_put(np);
131132
return -ENODEV;
132133
}
133134

0 commit comments

Comments
 (0)