WSL2-Linux-Kernel/drivers/of
Yang Yingliang 196ea810e2 of: property: decrement node refcount in of_fwnode_get_reference_args()
[ Upstream commit 60d865bd5a ]

In of_fwnode_get_reference_args(), the refcount of of_args.np has
been incremented in the case of successful return from
of_parse_phandle_with_args() or of_parse_phandle_with_fixed_args().

Decrement the refcount if of_args is not returned to the caller of
of_fwnode_get_reference_args().

Fixes: 3e3119d308 ("device property: Introduce fwnode_property_get_reference_args")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Frank Rowand <frowand.list@gmail.com>
Link: https://lore.kernel.org/r/20221121023209.3909759-1-yangyingliang@huawei.com
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:28:39 +01:00
..
unittest-data of: unittest: Statically apply overlays using fdtoverlay 2021-03-23 15:27:51 -06:00
Kconfig of: net: move of_net under net/ 2022-03-08 19:12:41 +01:00
Makefile of: net: move of_net under net/ 2022-03-08 19:12:41 +01:00
address.c of: Move of_dma_set_restricted_buffer() into device.c 2021-08-23 06:32:02 -04:00
base.c of: base: Improve argument length mismatch error 2022-01-27 11:05:19 +01:00
device.c of: device: Fix missing of_node_put() in of_dma_set_restricted_buffer 2022-08-17 14:23:51 +02:00
dynamic.c of: Add missing 'Return' section in kerneldoc comments 2021-03-27 12:59:03 -06:00
fdt.c of: fdt: fix off-by-one error in unflatten_dt_nodes() 2022-09-23 14:15:46 +02:00
fdt_address.c
irq.c of: Add missing 'Return' section in kerneldoc comments 2021-03-27 12:59:03 -06:00
kexec.c of: check previous kernel's ima-kexec-buffer against memory bounds 2022-08-17 14:23:38 +02:00
kobj.c of: Don't allow __of_attached_node_sysfs() without CONFIG_SYSFS 2021-08-23 13:52:09 -05:00
of_numa.c
of_private.h of: Move of_dma_set_restricted_buffer() into device.c 2021-08-23 06:32:02 -04:00
of_reserved_mem.c memblock: exclude MEMBLOCK_NOMAP regions from kmemleak 2021-10-21 18:30:49 -10:00
overlay.c of: overlay: do not break notify on NOTIFY_{OK|STOP} 2022-06-09 10:22:50 +02:00
pdt.c
platform.c iommu: Drop unnecessary of_iommu.h includes 2021-06-08 14:15:46 +02:00
property.c of: property: decrement node refcount in of_fwnode_get_reference_args() 2022-12-08 11:28:39 +01:00
resolver.c
unittest.c of: unittest: 64 bit dma address test requires arch support 2022-01-27 11:04:12 +01:00