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
This commit is contained in:
Thomas Gleixner 2022-11-11 14:54:20 +01:00
parent 1c82f0d3fc
commit befd780253

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