Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aad8d097 authored by Masahiro Yamada's avatar Masahiro Yamada Committed by Greg Kroah-Hartman
Browse files

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: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 38b0774c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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);