Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 702f7e36 authored by Dan Carpenter's avatar Dan Carpenter Committed by Jason Cooper
Browse files

irqchip: crossbar: Off by one bugs in init



My static checker complains that the ">" should be ">=" or else we go
beyond the end of the cb->irq_map[] array on the next line.

Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent c44e9d77
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -220,7 +220,7 @@ static int __init crossbar_of_init(struct device_node *node)
			of_property_read_u32_index(node,
						   "ti,irqs-reserved",
						   i, &entry);
			if (entry > max) {
			if (entry >= max) {
				pr_err("Invalid reserved entry\n");
				ret = -EINVAL;
				goto err_irq_map;
@@ -238,7 +238,7 @@ static int __init crossbar_of_init(struct device_node *node)
			of_property_read_u32_index(node,
						   "ti,irqs-skip",
						   i, &entry);
			if (entry > max) {
			if (entry >= max) {
				pr_err("Invalid skip entry\n");
				ret = -EINVAL;
				goto err_irq_map;