diff mbox

pci: off by one in dmar_get_fault_reason()

Message ID 20100621064635.GB5940@bicker (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Dan Carpenter June 21, 2010, 6:46 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
index 0a19708..3043636 100644
--- a/drivers/pci/dmar.c
+++ b/drivers/pci/dmar.c
@@ -1208,7 +1208,7 @@  static const char *intr_remap_fault_reasons[] =
 
 const char *dmar_get_fault_reason(u8 fault_reason, int *fault_type)
 {
-	if (fault_reason >= 0x20 && (fault_reason <= 0x20 +
+	if (fault_reason >= 0x20 && (fault_reason < 0x20 +
 				     ARRAY_SIZE(intr_remap_fault_reasons))) {
 		*fault_type = INTR_REMAP;
 		return intr_remap_fault_reasons[fault_reason - 0x20];