umber-kernel/drivers/nvmem
Krzysztof Kozlowski 26da747e75 nvmem: Drop OF node reference on nvmem_add_one_cell() failure
[ Upstream commit f397bc0781553d01b4cdba506c09334a31cb0ec5 ]

If nvmem_add_one_cell() failed, the ownership of "child" (or "info.np"),
thus its OF reference, is not passed further and function should clean
up by putting the reference it got via earlier of_node_get().  Note that
this is independent of references obtained via for_each_child_of_node()
loop.

Fixes: 50014d6596 ("nvmem: core: use nvmem_add_one_cell() in nvmem_add_cells_from_of()")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Signed-off-by: Srinivas Kandagatla <srini@kernel.org>
Link: https://patch.msgid.link/20260116170846.733558-2-srini@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2026-03-04 07:21:17 -05:00
..
layouts CRC updates for 6.17 2025-07-28 17:43:29 -07:00
Kconfig nvmem: an8855: drop an unused Kconfig symbol 2026-02-26 14:59:34 -08:00
Makefile nvmem: an8855: Add support for Airoha AN8855 Switch EFUSE 2025-09-12 15:49:03 +02:00
an8855-efuse.c nvmem: an8855: Add support for Airoha AN8855 Switch EFUSE 2025-09-12 15:49:03 +02:00
apple-efuses.c
apple-spmi-nvmem.c nvmem: Add apple-spmi-nvmem driver 2025-05-21 14:28:27 +02:00
bcm-ocotp.c
brcm_nvram.c net, treewide: define and use MAC_ADDR_STR_LEN 2025-03-19 19:17:58 +01:00
core.c nvmem: Drop OF node reference on nvmem_add_one_cell() failure 2026-03-04 07:21:17 -05:00
imx-iim.c nvmem: imx-iim: Convert comma to semicolon 2024-11-05 05:33:47 +01:00
imx-ocotp-ele.c nvmem: imx-ocotp: fix MAC address byte length 2025-07-13 17:43:13 +02:00
imx-ocotp-scu.c
imx-ocotp.c nvmem: imx-ocotp: fix MAC address byte length 2025-07-13 17:43:13 +02:00
internals.h
jz4780-efuse.c
lan9662-otpc.c
layerscape-sfp.c
layouts.c nvmem: layouts: fix nvmem_layout_bus_uevent 2025-11-24 18:08:10 +01:00
lpc18xx_eeprom.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
lpc18xx_otp.c nvmem: Correct some typos in comments 2024-11-05 05:33:47 +01:00
max77759-nvmem.c nvmem: max77759: Add Maxim MAX77759 NVMEM driver 2025-05-09 15:23:18 +01:00
meson-efuse.c
meson-mx-efuse.c
microchip-otpc.c nvmem: Correct some typos in comments 2024-11-05 05:33:47 +01:00
mtk-efuse.c Get rid of 'remove_new' relic from platform driver struct 2024-12-01 15:12:43 -08:00
mxs-ocotp.c
nintendo-otp.c
qcom-spmi-sdam.c nvmem: qcom-spmi-sdam: Set size in struct nvmem_config 2025-01-10 16:16:48 +01:00
qfprom.c nvmem: qfprom: switch to 4-byte aligned reads 2025-04-11 14:41:22 +02:00
qoriq-efuse.c
rave-sp-eeprom.c
rcar-efuse.c nvmem: rcar-efuse: add missing MODULE_DEVICE_TABLE 2025-10-22 08:02:38 +02:00
rmem.c nvmem: rmem: add CRC validation for Mobileye EyeQ5 NVMEM 2024-12-30 15:36:00 +01:00
rockchip-efuse.c
rockchip-otp.c nvmem: rockchip-otp: add rk3576 variant data 2025-04-11 14:41:21 +02:00
s32g-ocotp-nvmem.c nvmem: s32g-ocotp: Add driver for S32G OCOTP 2025-09-12 15:49:03 +02:00
sc27xx-efuse.c
sec-qfprom.c
snvs_lpgpr.c
sprd-efuse.c
stm32-bsec-optee-ta.c
stm32-bsec-optee-ta.h
stm32-romem.c
sunplus-ocotp.c nvmem: sunplus-ocotp: Use devm_platform_ioremap_resource_byname() helper function 2024-09-03 12:13:23 +02:00
sunxi_sid.c
u-boot-env.c nvmem: layouts: add U-Boot env layout 2024-09-11 16:05:15 +02:00
uniphier-efuse.c
vf610-ocotp.c
zynqmp_nvmem.c nvmem: zynqmp_nvmem: unbreak driver after cleanup 2025-05-21 14:28:11 +02:00