summaryrefslogtreecommitdiff
path: root/drivers/iommu/amd_iommu_init.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2017-08-19 01:28:02 +0300
committerJoerg Roedel <jroedel@suse.de>2017-08-19 11:33:42 +0300
commitae162efbf2870c326e06b4f905423fb888f9cd2a (patch)
treef48c85d6d508d5ba7879d6250386fc62c8ba5a6b /drivers/iommu/amd_iommu_init.c
parent20b46dff13bd1d250dc968b318f0fac3c996b3fa (diff)
downloadlinux-ae162efbf2870c326e06b4f905423fb888f9cd2a.tar.xz
iommu/amd: Fix compiler warning in copy_device_table()
This was reported by the kbuild bot. The condition in which entry would be used uninitialized can not happen, because when there is no iommu this function would never be called. But its no fast-path, so fix the warning anyway. Reported-by: kbuild test robot <fengguang.wu@intel.com> Acked-by: Baoquan He <bhe@redhat.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r--drivers/iommu/amd_iommu_init.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index c7d03251c80a..f2023cd08ef7 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -854,7 +854,7 @@ static int get_dev_entry_bit(u16 devid, u8 bit)
static bool copy_device_table(void)
{
- u64 int_ctl, int_tab_len, entry, last_entry = 0;
+ u64 int_ctl, int_tab_len, entry = 0, last_entry = 0;
struct dev_table_entry *old_devtb = NULL;
u32 lo, hi, devid, old_devtb_size;
phys_addr_t old_devtb_phys;