Commit 092550ea authored by Libing Zhou's avatar Libing Zhou Committed by Joerg Roedel

iommu/amd: Remove double zero check

The free_pages() does zero check, therefore remove double zero
check here.
Signed-off-by: default avatarLibing Zhou <libing.zhou@nokia-sbell.com>
Link: https://lore.kernel.org/r/20200722064450.GA63618@hzling02.china.nsn-net.netSigned-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 70fcd359
...@@ -720,21 +720,14 @@ static void iommu_enable_ppr_log(struct amd_iommu *iommu) ...@@ -720,21 +720,14 @@ static void iommu_enable_ppr_log(struct amd_iommu *iommu)
static void __init free_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)); free_pages((unsigned long)iommu->ppr_log, get_order(PPR_LOG_SIZE));
} }
static void free_ga_log(struct amd_iommu *iommu) static void free_ga_log(struct amd_iommu *iommu)
{ {
#ifdef CONFIG_IRQ_REMAP #ifdef CONFIG_IRQ_REMAP
if (iommu->ga_log) free_pages((unsigned long)iommu->ga_log, get_order(GA_LOG_SIZE));
free_pages((unsigned long)iommu->ga_log, free_pages((unsigned long)iommu->ga_log_tail, get_order(8));
get_order(GA_LOG_SIZE));
if (iommu->ga_log_tail)
free_pages((unsigned long)iommu->ga_log_tail,
get_order(8));
#endif #endif
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment