summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <weiyongjun1@huawei.com>2016-10-17 18:37:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-10-24 15:51:00 +0200
commit25633d1f5dd7ea35c77aae12c039a80e46abec01 (patch)
tree7fb5cb1ef5c15754daa658b4f9d0045c2601ad8a /drivers
parentstaging: android: ion: Fix error handling in ion_query_heaps() (diff)
downloadlinux-25633d1f5dd7ea35c77aae12c039a80e46abec01.tar.xz
linux-25633d1f5dd7ea35c77aae12c039a80e46abec01.zip
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 <weiyongjun1@huawei.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/arche-platform.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/arche-platform.c b/drivers/staging/greybus/arche-platform.c
index e36ee984485b..34307ac3f255 100644
--- a/drivers/staging/greybus/arche-platform.c
+++ b/drivers/staging/greybus/arche-platform.c
@@ -128,6 +128,7 @@ int arche_platform_change_state(enum arche_platform_state state,
pdev = of_find_device_by_node(np);
if (!pdev) {
pr_err("arche-platform device not found\n");
+ of_node_put(np);
return -ENODEV;
}