lkml.org 
[lkml]   [2022]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip: irq/core] genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs()
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@linutronix.de>
AuthorDate: Fri, 11 Nov 2022 14:54:20 +01:00
Committer: Thomas Gleixner <tglx@linutronix.de>
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@linutronix.de>
Reviewed-by: Ashok Raj <ashok.raj@intel.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20221111122013.831151822@linutronix.de

---
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;
}

\
 
 \ /
  Last update: 2022-11-17 16:13    [W:0.292 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site