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: 44bd78dd2b88 ("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues")
Signed-off-by: Marc Zyngier <maz@kernel.org>

Changed files
+2
drivers
+2
drivers/irqchip/irq-gic-common.c
··· 16 16 const struct gic_quirk *quirks, void *data) 17 17 { 18 18 for (; quirks->desc; quirks++) { 19 + if (!quirks->compatible && !quirks->property) 20 + continue; 19 21 if (quirks->compatible && 20 22 !of_device_is_compatible(np, quirks->compatible)) 21 23 continue;