]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
iommu/qcom: Simplify a test in 'qcom_iommu_add_device()'
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Mon, 16 Sep 2019 20:29:36 +0000 (22:29 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 15 Oct 2019 09:50:27 +0000 (11:50 +0200)
'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>
drivers/iommu/qcom_iommu.c

index c31e7bc4ccbec2f7083ba30541e2a2b70df7431a..3d99ec868892c446a5f537a2577dc49eb02030b5 100644 (file)
@@ -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);