[PATCH v1 2/2] genirq/msi: add an error print when __irq_domain_alloc_irqs() failed
From: Luo Jiaxing
Date: Mon Feb 08 2021 - 06:06:15 EST
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@xxxxxxxxxx>
---
kernel/irq/msi.c | 1 +
1 file changed, 1 insertion(+)
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,
desc->affinity);
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)
--
2.7.4