From: Christophe JAILLET Date: Sun, 15 Sep 2019 19:34:01 +0000 (+0200) Subject: iommu/arm-smmu: Axe a useless test in 'arm_smmu_master_alloc_smes()' X-Git-Tag: v5.5-rc1~77^2^7~2^2~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bdde4718aba368c33705ccff8f3e29586d41b69b;p=thirdparty%2Flinux.git iommu/arm-smmu: Axe a useless test in 'arm_smmu_master_alloc_smes()' 'iommu_group_get_for_dev()' never returns NULL, so this test can be removed. Reviewed-by: Robin Murphy Signed-off-by: Christophe JAILLET Signed-off-by: Will Deacon --- diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c index bd6683c210da6..080af0326816d 100644 --- a/drivers/iommu/arm-smmu.c +++ b/drivers/iommu/arm-smmu.c @@ -1054,8 +1054,6 @@ static int arm_smmu_master_alloc_smes(struct device *dev) } group = iommu_group_get_for_dev(dev); - if (!group) - group = ERR_PTR(-ENOMEM); if (IS_ERR(group)) { ret = PTR_ERR(group); goto out_err;