diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2017-09-11 11:00:12 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-09-18 16:12:26 +0200 |
commit | aad8d097c9224be264939fc6c02a5570ea094f60 (patch) | |
tree | 6eccf0ae0329e555ea9410e794c79fbcff45976b /drivers/nvmem | |
parent | nvmem: core: return EFBIG on out-of-range write (diff) | |
download | linux-aad8d097c9224be264939fc6c02a5570ea094f60.tar.xz linux-aad8d097c9224be264939fc6c02a5570ea094f60.zip |
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.c | 1 |
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); |