diff options
author | Robin Murphy <robin.murphy@arm.com> | 2025-02-27 14:47:47 +0000 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2025-03-11 14:05:39 +0100 |
commit | 29c6e1c2b923b43e8082bba5c6675185a8fe305a (patch) | |
tree | 1f864be1281660bd8d41ff1c7b1bea115ecb6150 /include/linux/iommu.h | |
parent | 032d7e435cbd81ffa37b846aea5a236f3f5912a3 (diff) |
iommu: Unexport iommu_fwspec_free()
The drivers doing their own fwspec parsing have no need to call
iommu_fwspec_free() since fwspecs were moved into dev_iommu, as
returning an error from .probe_device will tear down the whole lot
anyway. Move it into the private interface now that it only serves
for of_iommu to clean up in an error case.
I have no idea what mtk_v1 was doing in effectively guaranteeing
a NULL fwspec would be dereferenced if no "iommus" DT property was
found, so add a check for that to at least make the code look sane.
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/36e245489361de2d13db22a510fa5c79e7126278.1740667667.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux/iommu.h')
-rw-r--r-- | include/linux/iommu.h | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index e93d2e918599..cf8c16ba04a0 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -1099,7 +1099,6 @@ struct iommu_mm_data { }; int iommu_fwspec_init(struct device *dev, struct fwnode_handle *iommu_fwnode); -void iommu_fwspec_free(struct device *dev); int iommu_fwspec_add_ids(struct device *dev, const u32 *ids, int num_ids); static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev) @@ -1410,10 +1409,6 @@ static inline int iommu_fwspec_init(struct device *dev, return -ENODEV; } -static inline void iommu_fwspec_free(struct device *dev) -{ -} - static inline int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids) { |