kernel_samsung_a53x/drivers/of
Christian A. Ehrhardt 4b1ab8f608 of: unittest: Fix compile in the non-dynamic case
[ Upstream commit 607aad1e4356c210dbef9022955a3089377909b2 ]

If CONFIG_OF_KOBJ is not set, a device_node does not contain a
kobj and attempts to access the embedded kobj via kref_read break
the compile.

Replace affected kref_read calls with a macro that reads the
refcount if it exists and returns 1 if there is no embedded kobj.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202401291740.VP219WIz-lkp@intel.com/
Fixes: 4dde83569832 ("of: Fix double free in of_parse_phandle_with_args_map")
Signed-off-by: Christian A. Ehrhardt <lk@c--e.de>
Link: https://lore.kernel.org/r/20240129192556.403271-1-lk@c--e.de
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:13:28 +01:00
..
unittest-data of: Fix double free in of_parse_phandle_with_args_map 2024-11-18 12:12:43 +01:00
address.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
base.c of: Fix double free in of_parse_phandle_with_args_map 2024-11-18 12:12:43 +01:00
device.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
dynamic.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
fdt_address.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
irq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kobj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of_net.c Backport mac80211 patches from linux-6.1.y 2024-06-15 16:29:20 -03:00
of_numa.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of_private.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
of_reserved_mem.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
overlay.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pdt.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
platform.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
property.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
resolver.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
unittest.c of: unittest: Fix compile in the non-dynamic case 2024-11-18 12:13:28 +01:00