mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-24 11:25:43 +00:00
irqchip/gic: Correctly validate OF quirk descriptors
[ Upstream commit91539341a3
] 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:44bd78dd2b
("irqchip/gic-v3: Disable pseudo NMIs on Mediatek devices w/ firmware issues") Signed-off-by: Marc Zyngier <maz@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
22efb27a21
commit
9a9adc42a5
1 changed files with 2 additions and 0 deletions
|
@ -16,6 +16,8 @@ void gic_enable_of_quirks(const struct device_node *np,
|
|||
const struct gic_quirk *quirks, void *data)
|
||||
{
|
||||
for (; quirks->desc; quirks++) {
|
||||
if (!quirks->compatible && !quirks->property)
|
||||
continue;
|
||||
if (quirks->compatible &&
|
||||
!of_device_is_compatible(np, quirks->compatible))
|
||||
continue;
|
||||
|
|
Loading…
Reference in a new issue