From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753198AbbFGNdo (ORCPT ); Sun, 7 Jun 2015 09:33:44 -0400 Received: from mail-pd0-f180.google.com ([209.85.192.180]:33623 "EHLO mail-pd0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751151AbbFGNdf (ORCPT ); Sun, 7 Jun 2015 09:33:35 -0400 Message-ID: <1433684009.9134.1.camel@ingics.com> Subject: [PATCH] irqchip: sunxi-nmi: Fix off-by-one for iterating over gc->num_ct From: Axel Lin To: Thomas Gleixner , Jason Cooper Cc: Maxime Ripard , Carlo Caione , linux-kernel@vger.kernel.org Date: Sun, 07 Jun 2015 21:33:29 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.10-0ubuntu1~14.10.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Signed-off-by: Axel Lin --- drivers/irqchip/irq-sunxi-nmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-sunxi-nmi.c b/drivers/irqchip/irq-sunxi-nmi.c index 12f547a..eb9b59e 100644 --- a/drivers/irqchip/irq-sunxi-nmi.c +++ b/drivers/irqchip/irq-sunxi-nmi.c @@ -104,7 +104,7 @@ static int sunxi_sc_nmi_set_type(struct irq_data *data, unsigned int flow_type) irqd_set_trigger_type(data, flow_type); irq_setup_alt_chip(data, flow_type); - for (i = 0; i <= gc->num_ct; i++, ct++) + for (i = 0; i < gc->num_ct; i++, ct++) if (ct->type & flow_type) ctrl_off = ct->regs.type; -- 1.8.3.2