summaryrefslogtreecommitdiff
path: root/lib/utils/cppc/fdt_cppc.c
diff options
context:
space:
mode:
authorDavid E. Garcia Porras <[email protected]>2026-07-01 12:13:34 -0600
committerAnup Patel <[email protected]>2026-07-16 11:27:57 +0530
commit92bea7bdb2334a9274a824f9592026093febec7c (patch)
treeb6051ffbc59a222b58f046eef345ae0795cdbce5 /lib/utils/cppc/fdt_cppc.c
parent262571217c75c649115633d8075cb6a40d940733 (diff)
lib: sbi_irqchip: fix device lookup by caps when first is NULL
When called with first == NULL, sbi_irqchip_find_device_by_caps() should scan the device list from the start. Instead it always returns NULL: "found" starts false and only flips true when an entry equals "first", but no entry ever equals NULL, so every entry hits "else continue" and nothing is checked. This breaks MSI detection in sbi_mpxy, which calls it with first == NULL: ms->msi_avail = !!sbi_irqchip_find_device_by_caps(SBI_IRQCHIP_CAPS_MSI, NULL); msi_avail is therefore always false, so mpxy_write_std_attr() silently drops the MSI attributes (MSI_ADDR_LO/HI, MSI_DATA, MSI_CONTROL) while still returning success, and MSI-based MPXY notifications are never delivered. Initialize "found" from "first" so a NULL "first" scans from the beginning, and always continue in the pre-match branch so a non-NULL "first" resumes after the given device. Fixes: 8570b938444d ("lib: sbi_irqchip: Allow irqchip drivers advertise capabilities") Signed-off-by: David E. Garcia Porras <[email protected]> Reviewed-by: Anup Patel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib/utils/cppc/fdt_cppc.c')
0 files changed, 0 insertions, 0 deletions