mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04: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 <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
38b0774c05
commit
aad8d097c9
1 changed files with 1 additions and 0 deletions
|
|
@ -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 a new issue