Commit 02994fd2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 1831fed5 71ff461c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)