summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
diff options
context:
space:
mode:
authorLorenzo Pieralisi <lpieralisi@kernel.org>2025-08-04 16:55:53 +0200
committerThomas Gleixner <tglx@linutronix.de>2025-08-05 10:31:46 +0200
commit02cbf8e0692bd30717b35a3ff5e46460d1d5d471 (patch)
treebae851bb0f7379a01b4c2cd94543bf194615dc02 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
parentcb9f6a40382ca7b7a81d6f52285f897b09b5851b (diff)
irqchip/msi-lib: Fix fwnode refcount in msi_lib_irq_domain_select()
Commit 8b65db1e93a2 ("irqchip/msi-lib: Add IRQ_DOMAIN_FLAG_FWNODE_PARENT handling") added logic in msi_lib_irq_domain_select() to match the domain fwnode against the fwnode parent of the fwspec.fwnode. The fwnode_get_parent() caller must call fwnode_handle_put() on the returned pointer value, lest fwnode refcounting for the parent ends up being out of kilter. Fix this by relying on the fwnode_handle clean-up handlers and by incrementing the fwnode refcount regardless of whether parent matching is used or not (the domain selection code already holds a reference before calling msi_lib_irq_domain_select() but to make the exit path more uniform if IRQ_DOMAIN_FLAG_FWNODE_PARENT is not set fwnode_handle_get() is called again on fwspec.fwnode so that the clean-up code is the same for the two matching patterns). Fixes: 8b65db1e93a2 ("irqchip/msi-lib: Add IRQ_DOMAIN_FLAG_FWNODE_PARENT handling") Signed-off-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20250804145553.795065-1-lpieralisi@kernel.org
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
0 files changed, 0 insertions, 0 deletions