From: Thomas Gleixner <[email protected]>

Allocate the MSI device data on first invocation of the allocation function.

Signed-off-by: Thomas Gleixner <[email protected]>
Reviewed-by: Greg Kroah-Hartman <[email protected]>
Reviewed-by: Jason Gunthorpe <[email protected]>
Cc: Nishanth Menon <[email protected]>
Cc: Tero Kristo <[email protected]>
Cc: Santosh Shilimkar <[email protected]>
Cc: [email protected]
---
 drivers/soc/ti/ti_sci_inta_msi.c |    4 ++++
 1 file changed, 4 insertions(+)

--- a/drivers/soc/ti/ti_sci_inta_msi.c
+++ b/drivers/soc/ti/ti_sci_inta_msi.c
@@ -120,6 +120,10 @@ int ti_sci_inta_msi_domain_alloc_irqs(st
        if (pdev->id < 0)
                return -ENODEV;
 
+       ret = msi_setup_device_data(dev);
+       if (ret)
+               return ret;
+
        nvec = ti_sci_inta_msi_alloc_descs(dev, res);
        if (nvec <= 0)
                return nvec;


Reply via email to