public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] irqchip/irq-crossbar: off by one bugs in init
@ 2014-08-07 15:28 Dan Carpenter
  2014-08-17 17:20 ` Jason Cooper
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2014-08-07 15:28 UTC (permalink / raw)
  To: Thomas Gleixner, Sricharan R
  Cc: Jason Cooper, Grant Likely, Rob Herring, linux-kernel,
	kernel-janitors

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

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/drivers/irqchip/irq-crossbar.c b/drivers/irqchip/irq-crossbar.c
index 85c2985..bbbaf5d 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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch] irqchip/irq-crossbar: off by one bugs in init
  2014-08-07 15:28 [patch] irqchip/irq-crossbar: off by one bugs in init Dan Carpenter
@ 2014-08-17 17:20 ` Jason Cooper
  0 siblings, 0 replies; 2+ messages in thread
From: Jason Cooper @ 2014-08-17 17:20 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Thomas Gleixner, Sricharan R, Grant Likely, Rob Herring,
	linux-kernel, kernel-janitors

Dan,

On Thu, Aug 07, 2014 at 06:28:21PM +0300, Dan Carpenter wrote:
> My static checker complains that the ">" should be ">=" or else we go
> beyoned the end of the cb->irq_map[] array on the next line.
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Applied to irqchip/urgent

thx,

Jason.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-08-17 17:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-07 15:28 [patch] irqchip/irq-crossbar: off by one bugs in init Dan Carpenter
2014-08-17 17:20 ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox