Skip to content

Commit

Permalink
iommu/amd: Fix wrong check for ARRAY_SIZE()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Aug 10, 2012
1 parent 32ab31e commit 2bd5ed0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
}
Expand Down

0 comments on commit 2bd5ed0

Please sign in to comment.