linux/drivers/of
Peng Fan 7882541ca0 of/platform: increase refcount of fwnode
commit 0f8e565109
("of/platform: Propagate firmware node by calling device_set_node()")
use of_fwnode_handle to replace of_node_get, which introduces a side
effect that the refcount is not increased. Then the out of tree
jailhouse hypervisor enable/disable test will trigger kernel dump in
of_overlay_remove, with the following sequence
"
   of_changeset_revert(&overlay_changeset);
   of_changeset_destroy(&overlay_changeset);
   of_overlay_remove(&overlay_id);
"

So increase the refcount to avoid issues.

This patch also release the refcount when releasing amba device to avoid
refcount leakage.

Fixes: 0f8e565109 ("of/platform: Propagate firmware node by calling device_set_node()")
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/20230821023928.3324283-2-peng.fan@oss.nxp.com
Signed-off-by: Rob Herring <robh@kernel.org>
2023-08-21 16:12:28 -05:00
..
unittest-data of/address: Add support for 3 address cell bus 2023-04-13 17:46:35 -05:00
address.c dma-mapping updates for Linux 6.4 2023-04-29 10:29:57 -07:00
base.c Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
cpu.c of: Move CPU node related functions to their own file 2023-04-13 17:46:34 -05:00
device.c of: device: Kill of_device_request_module() 2023-04-05 19:41:11 +02:00
dynamic.c of: dynamic: Refactor action prints to not use "%pOF" inside devtree_lock 2023-08-21 09:23:55 -05:00
fdt_address.c of: Use SPDX license tag for DT files 2018-01-08 08:22:45 -06:00
fdt.c Devicetree fixes for 6.4, part 1: 2023-05-05 13:27:59 -07:00
irq.c of/irq: add missing of_node_put() for interrupt parent node 2023-01-18 11:31:42 -06:00
Kconfig of: make OF_EARLY_FLATTREE depend on HAS_IOMEM 2023-07-10 08:48:35 -06:00
kexec.c mm,ima,kexec,of: use memblock_free_late from ima_free_kexec_buffer 2023-08-18 11:47:45 -05:00
kobj.c of: make of_node_ktype constant 2023-02-06 11:03:00 -06:00
Makefile Char/Misc drivers for 6.4-rc1 2023-04-27 12:07:50 -07:00
module.c of: Move the request module helper logic to module.c 2023-04-05 19:41:10 +02:00
of_numa.c of, numa: Fetch empty NUMA node ID from distance map 2021-10-04 13:13:44 -05:00
of_private.h of: Make devtree_lock declaration private 2023-04-10 18:32:31 -05:00
of_reserved_mem.c of: reserved_mem: Use stable allocation order 2023-06-20 09:34:58 -06:00
overlay.c of: overlay: Fix missing of_node_put() in error case of init_overlay_changeset() 2023-06-09 16:12:37 -06:00
pdt.c of: Remove struct device_node.type pointer 2019-01-10 16:24:44 -06:00
platform.c of/platform: increase refcount of fwnode 2023-08-21 16:12:28 -05:00
property.c Devicetree updates for v6.3: 2023-02-24 13:31:53 -08:00
resolver.c of: overlay: log the error cause on resolver failure 2020-03-02 11:32:44 -06:00
unittest.c of: unittest: Fix EXPECT for parse_phandle_with_args_map() test 2023-08-21 09:23:38 -05:00