mirror of
https://github.com/torvalds/linux.git
synced 2024-12-01 00:21:32 +00:00
iommu/amd: Remove unnecessary assignment
From: Adrian Huang <ahuang12@lenovo.com> The values of local variables are assigned after local variables are declared, so no need to assign the initial value during the variable declaration. And, no need to assign NULL for the local variable 'ivrs_base' after invoking acpi_put_table(). Signed-off-by: Adrian Huang <ahuang12@lenovo.com> Acked-by: Will Deacon <will@kernel.org> Link: https://lore.kernel.org/r/20201210021330.2022-1-adrianhuang0701@gmail.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
parent
6ee1d745b7
commit
f8993dc666
@ -1911,7 +1911,7 @@ static void print_iommu_info(void)
|
||||
static int __init amd_iommu_init_pci(void)
|
||||
{
|
||||
struct amd_iommu *iommu;
|
||||
int ret = 0;
|
||||
int ret;
|
||||
|
||||
for_each_iommu(iommu) {
|
||||
ret = iommu_init_pci(iommu);
|
||||
@ -2637,8 +2637,8 @@ static void __init free_dma_resources(void)
|
||||
static int __init early_amd_iommu_init(void)
|
||||
{
|
||||
struct acpi_table_header *ivrs_base;
|
||||
int i, remap_cache_sz, ret;
|
||||
acpi_status status;
|
||||
int i, remap_cache_sz, ret = 0;
|
||||
u32 pci_id;
|
||||
|
||||
if (!amd_iommu_detected)
|
||||
@ -2780,7 +2780,6 @@ static int __init early_amd_iommu_init(void)
|
||||
out:
|
||||
/* Don't leak any ACPI memory */
|
||||
acpi_put_table(ivrs_base);
|
||||
ivrs_base = NULL;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user