diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2012-08-10 11:34:08 +0200 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2012-08-10 11:34:08 +0200 |
commit | 2bd5ed002c0c493ac328f13a9e2a504261a7d48e (patch) | |
tree | df5a32eb1eab5aa4d4adb40ba744b02ef76aa8f8 /drivers/iommu | |
parent | 32ab31e01e2def6f48294d872d9bb42573aae00f (diff) | |
download | linux-2bd5ed002c0c493ac328f13a9e2a504261a7d48e.tar.bz2 |
iommu/amd: Fix wrong check for ARRAY_SIZE()
The check in the for-loop is broken. Fix it and the
boot-crash it causes in AMD IOMMUv2 systems.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 0a2ea317120a..18a89b760aaa 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -1111,7 +1111,7 @@ static void print_iommu_info(void) if (iommu->cap & (1 << IOMMU_CAP_EFR)) { pr_info("AMD-Vi: Extended features: "); - for (i = 0; ARRAY_SIZE(feat_str); ++i) { + for (i = 0; i < ARRAY_SIZE(feat_str); ++i) { if (iommu_feature(iommu, (1ULL << i))) pr_cont(" %s", feat_str[i]); } |