From: Masahiro Yamada Date: Mon, 11 Sep 2017 09:00:12 +0000 (+0200) Subject: nvmem: add missing of_node_put() in of_nvmem_cell_get() X-Git-Tag: v4.14-rc4~37^2~5 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=aad8d097c9224be264939fc6c02a5570ea094f60;p=linux-block.git 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 Signed-off-by: Srinivas Kandagatla Signed-off-by: Greg Kroah-Hartman --- 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);