This should be '<' here instead of '<=' so we don't go past the end of the array. Signed-off-by: Dan Carpenter <error27@xxxxxxxxx> 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]; -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html