summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibing Zhou <libing.zhou@nokia-sbell.com>2020-07-22 09:44:50 +0300
committerJoerg Roedel <jroedel@suse.de>2020-07-22 16:26:15 +0300
commit092550eacd040a349917a6bbe90ad543258e1695 (patch)
tree8bc26fa05db5c962f4f3de74ff0a8c84b9c865bc
parent70fcd3592b05fde4d95938cd5a20e996b4ef4e15 (diff)
downloadlinux-092550eacd040a349917a6bbe90ad543258e1695.tar.xz
iommu/amd: Remove double zero check
The free_pages() does zero check, therefore remove double zero check here. Signed-off-by: Libing Zhou <libing.zhou@nokia-sbell.com> Link: https://lore.kernel.org/r/20200722064450.GA63618@hzling02.china.nsn-net.net Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--drivers/iommu/amd/init.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c
index 232683ea10e0..958050c213f9 100644
--- a/drivers/iommu/amd/init.c
+++ b/drivers/iommu/amd/init.c
@@ -720,21 +720,14 @@ static void iommu_enable_ppr_log(struct amd_iommu *iommu)
static void __init free_ppr_log(struct amd_iommu *iommu)
{
- if (iommu->ppr_log == NULL)
- return;
-
free_pages((unsigned long)iommu->ppr_log, get_order(PPR_LOG_SIZE));
}
static void free_ga_log(struct amd_iommu *iommu)
{
#ifdef CONFIG_IRQ_REMAP
- if (iommu->ga_log)
- free_pages((unsigned long)iommu->ga_log,
- get_order(GA_LOG_SIZE));
- if (iommu->ga_log_tail)
- free_pages((unsigned long)iommu->ga_log_tail,
- get_order(8));
+ free_pages((unsigned long)iommu->ga_log, get_order(GA_LOG_SIZE));
+ free_pages((unsigned long)iommu->ga_log_tail, get_order(8));
#endif
}