From: Christophe JAILLET Date: Mon, 16 Sep 2019 20:29:36 +0000 (+0200) Subject: iommu/qcom: Simplify a test in 'qcom_iommu_add_device()' X-Git-Tag: v5.5-rc1~77^2^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=da6b05dce2a9c69880c3b9838938d5714703e80d;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Dan Carpenter Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/qcom_iommu.c b/drivers/iommu/qcom_iommu.c index c31e7bc4ccbec..3d99ec868892c 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);