Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1730212 > unrolled thread

[PATCH 2/4] nvmem: add missing of_node_put() in of_nvmem_cell_get()

Started bysrinivas.kandagatla@linaro.org
First post2017-09-11 11:10 +0200
Last post2017-09-11 11:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/4] nvmem: add missing of_node_put() in of_nvmem_cell_get() srinivas.kandagatla@linaro.org - 2017-09-11 11:10 +0200

#1730212 — [PATCH 2/4] nvmem: add missing of_node_put() in of_nvmem_cell_get()

Fromsrinivas.kandagatla@linaro.org
Date2017-09-11 11:10 +0200
Subject[PATCH 2/4] nvmem: add missing of_node_put() in of_nvmem_cell_get()
Message-ID<uosT7-Sm-1@gated-at.bofh.it>
From: Masahiro Yamada <yamada.masahiro@socionext.com>

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>
---
 drivers/nvmem/core.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index 3866117..d12e5de 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);
 
-- 
2.9.3

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web