Skip to content

Commit ac646f4

Browse files
tititiou36KAGA-KOKO
authored andcommitted
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 <christophe.jaillet@wanadoo.fr> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://patch.msgid.link/1ce680114cdb8d40b072c54d7f015696a540e5a6.1760863194.git.christophe.jaillet@wanadoo.fr
1 parent dce7450 commit ac646f4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

kernel/irq/msi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ static int msi_domain_alloc(struct irq_domain *domain, unsigned int virq,
706706
irq_hw_number_t hwirq = ops->get_hwirq(info, arg);
707707
int i, ret;
708708

709-
if (irq_find_mapping(domain, hwirq) > 0)
709+
if (irq_resolve_mapping(domain, hwirq))
710710
return -EEXIST;
711711

712712
if (domain->parent) {

0 commit comments

Comments
 (0)