Skip to content

Commit 9153934

Browse files
author
Marc Zyngier
committed
irqchip/gic: Correctly validate OF quirk descriptors
When checking for OF quirks, make sure either 'compatible' or 'property' is set, and give up otherwise. This avoids non-OF quirks being randomly applied as they don't have any of the OF data that need checking. Cc: Douglas Anderson <dianders@chromium.org> Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Fixes: 44bd78d ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues") Signed-off-by: Marc Zyngier <maz@kernel.org>
1 parent cddb536 commit 9153934

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/irqchip/irq-gic-common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ void gic_enable_of_quirks(const struct device_node *np,
1616
const struct gic_quirk *quirks, void *data)
1717
{
1818
for (; quirks->desc; quirks++) {
19+
if (!quirks->compatible && !quirks->property)
20+
continue;
1921
if (quirks->compatible &&
2022
!of_device_is_compatible(np, quirks->compatible))
2123
continue;

0 commit comments

Comments
 (0)