Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 31185d66 authored by Mitchel Humpherys's avatar Mitchel Humpherys Committed by Matt Wagantall
Browse files

iommu/arm-smmu: Check of_match_node for NULL



In ["iommu/arm-smmu: fix architecture version detection"] we added the
ability to determine the SMMU architecture version from DT match data by
using of_match_node, but neglected to check the return value for NULL.
Fix this.

Change-Id: Ib9049f2b2f1204b52bc07ba8caf075449af4cd35
Signed-off-by: default avatarMitchel Humpherys <mitchelh@codeaurora.org>
parent aa7f0f8f
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -2620,6 +2620,8 @@ static int arm_smmu_device_dt_probe(struct platform_device *pdev)
	mutex_init(&smmu->atos_lock);

	of_id = of_match_node(arm_smmu_of_match, dev->of_node);
	if (!of_id)
		return -ENODEV;
	smmu->version = (enum arm_smmu_arch_version)of_id->data;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);