|
@@ -220,7 +220,7 @@ static int __init crossbar_of_init(struct device_node *node)
|
|
of_property_read_u32_index(node,
|
|
of_property_read_u32_index(node,
|
|
"ti,irqs-reserved",
|
|
"ti,irqs-reserved",
|
|
i, &entry);
|
|
i, &entry);
|
|
- if (entry > max) {
|
|
|
|
|
|
+ if (entry >= max) {
|
|
pr_err("Invalid reserved entry\n");
|
|
pr_err("Invalid reserved entry\n");
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
goto err_irq_map;
|
|
goto err_irq_map;
|
|
@@ -238,7 +238,7 @@ static int __init crossbar_of_init(struct device_node *node)
|
|
of_property_read_u32_index(node,
|
|
of_property_read_u32_index(node,
|
|
"ti,irqs-skip",
|
|
"ti,irqs-skip",
|
|
i, &entry);
|
|
i, &entry);
|
|
- if (entry > max) {
|
|
|
|
|
|
+ if (entry >= max) {
|
|
pr_err("Invalid skip entry\n");
|
|
pr_err("Invalid skip entry\n");
|
|
ret = -EINVAL;
|
|
ret = -EINVAL;
|
|
goto err_irq_map;
|
|
goto err_irq_map;
|