From: Antonio Borneo Date: Thu, 12 May 2022 16:05:44 +0000 (+0200) Subject: genirq: Don't return error on missing optional irq_request_resources() X-Git-Tag: v5.10.137~460 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4aba3247af12ddb4cec8c0272bb76ff129f89e74;p=thirdparty%2Fkernel%2Fstable.git 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 Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20220512160544.13561-1-antonio.borneo@foss.st.com Signed-off-by: Sasha Levin --- diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index 0b70811fd9561..621d8dd157bc1 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1543,7 +1543,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);