Commit da6b05dc authored by Christophe JAILLET's avatar Christophe JAILLET Committed by Joerg Roedel
Browse files

iommu/qcom: Simplify a test in 'qcom_iommu_add_device()'



'iommu_group_get_for_dev()' never returns NULL, so this test can be
simplified a bit.

This way, the test is consistent with all other calls to
'iommu_group_get_for_dev()'.

Signed-off-by: default avatarChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 4f5cafb5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -539,8 +539,8 @@ static int qcom_iommu_add_device(struct device *dev)
	}

	group = iommu_group_get_for_dev(dev);
	if (IS_ERR_OR_NULL(group))
		return PTR_ERR_OR_ZERO(group);
	if (IS_ERR(group))
		return PTR_ERR(group);

	iommu_group_put(group);
	iommu_device_link(&qcom_iommu->iommu, dev);