From patchwork Tue Oct 5 08:42:10 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Evgeny Kuznetsov X-Patchwork-Id: 231471 X-Patchwork-Delegate: tony@atomide.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o958lAi8003498 for ; Tue, 5 Oct 2010 08:47:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757959Ab0JEIqf (ORCPT ); Tue, 5 Oct 2010 04:46:35 -0400 Received: from smtp.nokia.com ([192.100.122.233]:54702 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757950Ab0JEIqe (ORCPT ); Tue, 5 Oct 2010 04:46:34 -0400 Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o958jkPS029554; Tue, 5 Oct 2010 11:45:48 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Oct 2010 11:45:46 +0300 Received: from xesebe101.nee.nokia.com ([147.243.42.11]) by esebh102.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Oct 2010 11:45:45 +0300 Received: from xesefe101.nee.nokia.com ([147.243.42.13]) by xesebe101.nee.nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Oct 2010 11:45:45 +0300 Received: from localhost.localdomain ([10.127.9.148]) by xesefe101.nee.nokia.com with Microsoft SMTPSVC(6.0.3790.4675); Tue, 5 Oct 2010 11:45:45 +0300 From: Evgeny Kuznetsov To: tony@atomide.com Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, khilman@deeprootsystems.com, akpm@linux-foundation.org, zmc@lurian.net, a.j.buxton@gmail.com, ext-eugeny.kuznetsov@nokia.com Subject: [PATCH 1/1] omap: Ptr "isr_reg" tracked as NULL was dereferenced Date: Tue, 5 Oct 2010 12:42:10 +0400 Message-Id: <131d16236d19895323fca2f058d65f1f116bacad.1286261378.git.EXT-Eugeny.Kuznetsov@nokia.com> X-Mailer: git-send-email 1.6.3.3 In-Reply-To: References: In-Reply-To: References: X-OriginalArrivalTime: 05 Oct 2010 08:45:45.0566 (UTC) FILETIME=[B37A1FE0:01CB6469] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Tue, 05 Oct 2010 08:47:29 +0000 (UTC) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index c05c653..7669928 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -1318,6 +1318,13 @@ static void gpio_irq_handler(unsigned int irq, struct irq_desc *desc) if (bank->method == METHOD_GPIO_44XX) isr_reg = bank->base + OMAP4_GPIO_IRQSTATUS0; #endif + + if (!isr_reg) { + printk(KERN_ERR "FATAL: Incorrect GPIO method %i\n", + bank->method); + BUG(); + } + while(1) { u32 isr_saved, level_mask = 0; u32 enabled;