summaryrefslogtreecommitdiff
path: root/drivers/nvmem
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2017-09-11 12:00:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-18 17:12:26 +0300
commitaad8d097c9224be264939fc6c02a5570ea094f60 (patch)
tree6eccf0ae0329e555ea9410e794c79fbcff45976b /drivers/nvmem
parent38b0774c0598c7a54b8499d18c2b764c35dc94ab (diff)
downloadlinux-aad8d097c9224be264939fc6c02a5570ea094f60.tar.xz
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/nvmem')
-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);