mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
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>
This commit is contained in:
parent
38b0774c05
commit
aad8d097c9
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user