nvmem: core: fix missing of_node_put() in of_nvmem_device_get()
authorVadym Kochan <vadym.kochan@plvision.eu>
Thu, 17 Sep 2020 13:44:37 +0000 (14:44 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 17 Sep 2020 16:48:23 +0000 (18:48 +0200)
commitb1c194dcdb1425fa59eec61ab927cfff33096149
tree36085ff717b7279a94cb096355ebfa14dd6cacaa
parent1eb51d6a4fce66e7c4428b5761b75b357931422a
nvmem: core: fix missing of_node_put() in of_nvmem_device_get()

of_parse_phandle() returns device_node with incremented ref count
which needs to be decremented by of_node_put() when device_node
is not used.

Fixes: e2a5402ec7c6 ("nvmem: Add nvmem_device based consumer apis.")
Signed-off-by: Vadym Kochan <vadym.kochan@plvision.eu>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20200917134437.16637-5-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c