From e86b041ffeff554c9458882ebabc2aba5c864186 Mon Sep 17 00:00:00 2001 From: Zhen Lei Date: Thu, 13 May 2021 15:58:15 +0800 Subject: iommu: Delete a duplicate check in iommu_change_dev_def_domain() Function iommu_group_store_type() is the only caller of the static function iommu_change_dev_def_domain() and has performed "if (WARN_ON(!group))" detection before calling it. So the one here is redundant. Signed-off-by: Zhen Lei Acked-by: Will Deacon Link: https://lore.kernel.org/r/20210513075815.6382-1-thunder.leizhen@huawei.com Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'drivers/iommu/iommu.c') diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 808ab70d5df5..5419c4b9f27a 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -3059,9 +3059,6 @@ static int iommu_change_dev_def_domain(struct iommu_group *group, int ret, dev_def_dom; struct device *dev; - if (!group) - return -EINVAL; - mutex_lock(&group->mutex); if (group->default_domain != group->domain) { -- cgit v1.2.3