diff --git a/arch/powerpc/kernel/prom_parse.c b/arch/powerpc/kernel/prom_parse.c index 21009b1f7869808ef3f6d1befb63416a3d2452bf..6a7e997c401d8ea81cbbf5e3259927c0875000c5 100644 --- a/arch/powerpc/kernel/prom_parse.c +++ b/arch/powerpc/kernel/prom_parse.c @@ -881,7 +881,7 @@ int of_irq_map_one(struct device_node *device, int index, struct of_irq *out_irq intsize = *tmp; /* Check index */ - if (index * intsize >= intlen) + if ((index + 1) * intsize > intlen) return -EINVAL; /* Get new specifier and map it */