genirq/msi: Use MSI_DESC_ALL in msi_add_simple_msi_descs()
authorThomas Gleixner <tglx@linutronix.de>
Fri, 11 Nov 2022 13:54:20 +0000 (14:54 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 17 Nov 2022 14:15:18 +0000 (15:15 +0100)
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

index a9ee535293eb264d52b1b52d861c1a26cd3fd101..bba6359d84502ce53ec5f8d4a072d3fc18b59496 100644 (file)
@@ -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;
 }