From: Christophe JAILLET Date: Sun, 19 Oct 2025 08:40:08 +0000 (+0200) Subject: genirq/msi: Slightly simplify msi_domain_alloc() X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ac646f44956edc9aaa406b4a8fef17888a2166af;p=thirdparty%2Fkernel%2Flinux.git genirq/msi: Slightly simplify msi_domain_alloc() The return value of irq_find_mapping() is only tested, not used for anything else. Replaced it by irq_resolve_mapping() which is internally used by irq_find_mapping() and allows a simple boolean decision. Signed-off-by: Christophe JAILLET Signed-off-by: Thomas Gleixner Link: https://patch.msgid.link/1ce680114cdb8d40b072c54d7f015696a540e5a6.1760863194.git.christophe.jaillet@wanadoo.fr --- diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index e7ad992548416..68886881fe10b 100644 --- a/kernel/irq/msi.c +++ b/kernel/irq/msi.c @@ -706,7 +706,7 @@ static int msi_domain_alloc(struct irq_domain *domain, unsigned int virq, irq_hw_number_t hwirq = ops->get_hwirq(info, arg); int i, ret; - if (irq_find_mapping(domain, hwirq) > 0) + if (irq_resolve_mapping(domain, hwirq)) return -EEXIST; if (domain->parent) {