summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorAntonio Borneo <antonio.borneo@foss.st.com>2022-05-12 18:05:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-25 11:17:29 +0200
commit3fb368c0ae39ed6075fe45bef3ba9783213192a6 (patch)
treec63bce9f6f20b4f04719dab85aac01a5f2c61493 /kernel
parentb3f423683818cfe15de14d5d9dff44148ff16bbf (diff)
downloadlinux-3fb368c0ae39ed6075fe45bef3ba9783213192a6.tar.gz
linux-3fb368c0ae39ed6075fe45bef3ba9783213192a6.tar.bz2
linux-3fb368c0ae39ed6075fe45bef3ba9783213192a6.zip
genirq: Don't return error on missing optional irq_request_resources()
[ Upstream commit 95001b756467ecc9f5973eb5e74e97699d9bbdf1 ] 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 <antonio.borneo@foss.st.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220512160544.13561-1-antonio.borneo@foss.st.com Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/irq/chip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 856f0297dc73..521121c2666c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -1484,7 +1484,8 @@ int irq_chip_request_resources_parent(struct irq_data *data)
if (data->chip->irq_request_resources)
return data->chip->irq_request_resources(data);
- return -ENOSYS;
+ /* no error on missing optional irq_chip::irq_request_resources */
+ return 0;
}
EXPORT_SYMBOL_GPL(irq_chip_request_resources_parent);