Skip to content

Commit f25dd9a

Browse files
committed
soc: ti: ti_sci_inta_msi: Switch MSI descriptor locking to guard()
Convert the code to use the new guard(msi_descs_lock). No functional change intended. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Nishanth Menon <[email protected]> Reviewed-by: Jonathan Cameron <[email protected]> Reviewed-by: Dhruva Gole <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 0dac2b0 commit f25dd9a

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

drivers/soc/ti/ti_sci_inta_msi.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -103,19 +103,15 @@ int ti_sci_inta_msi_domain_alloc_irqs(struct device *dev,
103103
if (ret)
104104
return ret;
105105

106-
msi_lock_descs(dev);
106+
guard(msi_descs_lock)(dev);
107107
nvec = ti_sci_inta_msi_alloc_descs(dev, res);
108-
if (nvec <= 0) {
109-
ret = nvec;
110-
goto unlock;
111-
}
108+
if (nvec <= 0)
109+
return nvec;
112110

113111
/* Use alloc ALL as it's unclear whether there are gaps in the indices */
114112
ret = msi_domain_alloc_irqs_all_locked(dev, MSI_DEFAULT_DOMAIN, nvec);
115113
if (ret)
116114
dev_err(dev, "Failed to allocate IRQs %d\n", ret);
117-
unlock:
118-
msi_unlock_descs(dev);
119115
return ret;
120116
}
121117
EXPORT_SYMBOL_GPL(ti_sci_inta_msi_domain_alloc_irqs);

0 commit comments

Comments
 (0)