summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2019-09-16 22:29:36 +0200
committerJoerg Roedel <jroedel@suse.de>2019-10-15 11:50:27 +0200
commitda6b05dce2a9c69880c3b9838938d5714703e80d (patch)
tree66ee711b4eeb774e59165231b09b6ca4b07d8ea8
parent4f5cafb5cb8471e54afdc9054d973535614f7675 (diff)
downloadlinux-da6b05dce2a9c69880c3b9838938d5714703e80d.tar.gz
linux-da6b05dce2a9c69880c3b9838938d5714703e80d.tar.bz2
linux-da6b05dce2a9c69880c3b9838938d5714703e80d.zip
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: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/qcom_iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c
index c31e7bc4ccbe..3d99ec868892 100644
--- a/drivers/iommu/qcom_iommu.c
+++ b/drivers/iommu/qcom_iommu.c
@@ -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);