[tip: irq/core] genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs()
From: tip-bot2 for Thomas Gleixner
Date: Thu Nov 17 2022 - 10:11:40 EST
The following commit has been merged into the irq/core branch of tip:
Commit-ID: befd780253e774ea9388dd8dfad7c627a0aa7e02
Gitweb: https://git.kernel.org/tip/befd780253e774ea9388dd8dfad7c627a0aa7e02
Author: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
AuthorDate: Fri, 11 Nov 2022 14:54:20 +01:00
Committer: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
CommitterDate: Thu, 17 Nov 2022 15:15:18 +01:00
genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs()
There are no associated MSI descriptors in the requested range when the MSI
descriptor allocation fails. Use MSI_DESC_ALL as the filter which prepares
the next step to get rid of the filter for freeing.
Signed-off-by: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Reviewed-by: Ashok Raj <ashok.raj@xxxxxxxxx>
Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
Link: https://lore.kernel.org/r/20221111122013.831151822@xxxxxxxxxxxxx
---
kernel/irq/msi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c
index a9ee535..bba6359 100644
--- a/kernel/irq/msi.c
+++ b/kernel/irq/msi.c
@@ -120,7 +120,7 @@ static int msi_add_simple_msi_descs(struct device *dev, unsigned int index, unsi
fail_mem:
ret = -ENOMEM;
fail:
- msi_free_msi_descs_range(dev, MSI_DESC_NOTASSOCIATED, index, last);
+ msi_free_msi_descs_range(dev, MSI_DESC_ALL, index, last);
return ret;
}