Skip to content

Commit 95001b7

Browse files
AntonioBorneoMarc Zyngier
authored andcommitted
genirq: Don't return error on missing optional irq_request_resources()
Function irq_chip::irq_request_resources() is reported as optional in the declaration of struct irq_chip. If the parent irq_chip does not implement it, we should ignore it and return. Don't return error if the functions is missing. Signed-off-by: Antonio Borneo <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent a111daf commit 95001b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

kernel/irq/chip.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1516,7 +1516,8 @@ int irq_chip_request_resources_parent(struct irq_data *data)
15161516
if (data->chip->irq_request_resources)
15171517
return data->chip->irq_request_resources(data);
15181518

1519-
return -ENOSYS;
1519+
/* no error on missing optional irq_chip::irq_request_resources */
1520+
return 0;
15201521
}
15211522
EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);
15221523

0 commit comments

Comments
 (0)