diff mbox series

[v1,2/2] genirq/msi: add an error print when __irq_domain_alloc_irqs() failed

Message ID 1612781926-56206-3-git-send-email-luojiaxing@huawei.com
State New
Headers show
Series irqchip/gic-v3-its: don't set bitmap for LPI which user didn't allocate | expand

Commit Message

luojiaxing Feb. 8, 2021, 10:58 a.m. UTC
During debug, we found that the return value of __irq_domain_alloc_irqs()
will be overwritten by the return value of subsequent function. As a
result, the locating clue will be lost.

To improve debug efficiency, an error message is added to print the
return value of __irq_domain_alloc_irqs().

Signed-off-by: Luo Jiaxing <luojiaxing@huawei.com>
 kernel/irq/msi.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series


diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index b338d62..f8729b0 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -418,6 +418,7 @@  int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
 		if (virq < 0) {
 			ret = -ENOSPC;
+			dev_err(dev, "failed to allocate irq, virq=%d\n", virq);
 			if (ops->handle_error)
 				ret = ops->handle_error(domain, desc, ret);
 			if (ops->msi_finish)