summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-04-08 06:29:25 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2022-04-08 06:29:25 -1000
commit02994fd2da76b99d3f6777f5b3bdb5d2823a0fed (patch)
tree0bd06646eff4ab922993044b31bddf552c90756a /drivers
parent1831fed559732b132aef0ea8261ac77e73f7eadf (diff)
parent71ff461c3f41f6465434b9e980c01782763e7ad8 (diff)
Merge tag 'iommu-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu
Pull iommu fix from Joerg Roedel: - Fix boot regression due to a NULL-ptr dereference on OMAP machines * tag 'iommu-fix-v5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu: iommu/omap: Fix regression in probe for NULL pointer dereference
Diffstat (limited to 'drivers')
-rw-r--r--drivers/iommu/omap-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 4aab631ef517..d9cf2820c02e 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1661,7 +1661,7 @@ static struct iommu_device *omap_iommu_probe_device(struct device *dev)
num_iommus = of_property_count_elems_of_size(dev->of_node, "iommus",
sizeof(phandle));
if (num_iommus < 0)
- return 0;
+ return ERR_PTR(-ENODEV);
arch_data = kcalloc(num_iommus + 1, sizeof(*arch_data), GFP_KERNEL);
if (!arch_data)