diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2014-08-07 17:28:21 +0200 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2014-08-18 13:48:11 +0200 |
commit | 702f7e36f74254e3e9c013eb969663433885cea7 (patch) | |
tree | be83691899d112b6d8d874aef61c80ef929137d2 /drivers/irqchip/irq-crossbar.c | |
parent | irqchip: gic-v3: Tag all low level accessors __maybe_unused (diff) | |
download | linux-702f7e36f74254e3e9c013eb969663433885cea7.tar.xz linux-702f7e36f74254e3e9c013eb969663433885cea7.zip |
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: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Diffstat (limited to 'drivers/irqchip/irq-crossbar.c')
-rw-r--r-- | drivers/irqchip/irq-crossbar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c index 85c2985d8bcb..bbbaf5de65d2 100644 --- a/drivers/irqchip/irq-crossbar.c +++ b/drivers/irqchip/irq-crossbar.c @@ -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; |