projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
38b0774
)
nvmem: add missing of_node_put() in of_nvmem_cell_get()
author
Masahiro Yamada
<yamada.masahiro@socionext.com>
Mon, 11 Sep 2017 09:00:12 +0000
(11:00 +0200)
committer
Greg Kroah-Hartman
<gregkh@linuxfoundation.org>
Mon, 18 Sep 2017 14:12:26 +0000
(16:12 +0200)
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>
drivers/nvmem/core.c
patch
|
blob
|
history
diff --git
a/drivers/nvmem/core.c
b/drivers/nvmem/core.c
index
3866117
..
d12e5de
100644
(file)
--- 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);