summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-11 11:00:12 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-18 16:12:26 +0200
commitaad8d097c9224be264939fc6c02a5570ea094f60 (patch)
tree6eccf0ae0329e555ea9410e794c79fbcff45976b /drivers
parent38b0774c0598c7a54b8499d18c2b764c35dc94ab (diff)
downloadlinux-aad8d097c9224be264939fc6c02a5570ea094f60.tar.bz2
nvmem: add missing of_node_put() in of_nvmem_cell_get()
of_get_next_parent() increments the refcount of the returned node. It should be put when done. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/nvmem/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 3866117bc285..d12e5de78e70 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -789,6 +789,7 @@ struct nvmem_cell *of_nvmem_cell_get(struct device_node *np,
return ERR_PTR(-EINVAL);
nvmem = __nvmem_device_get(nvmem_np, NULL, NULL);
+ of_node_put(nvmem_np);
if (IS_ERR(nvmem))
return ERR_CAST(nvmem);