From patchwork Tue Jul 12 22:31:50 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Poynor X-Patchwork-Id: 969482 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6CMWncG026734 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 12 Jul 2011 22:33:11 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QglVK-0001zo-NO; Tue, 12 Jul 2011 22:32:34 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QglVK-0005yO-BH; Tue, 12 Jul 2011 22:32:34 +0000 Received: from smtp-out.google.com ([74.125.121.67]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QglV4-0005vC-1W for linux-arm-kernel@lists.infradead.org; Tue, 12 Jul 2011 22:32:19 +0000 Received: from wpaz17.hot.corp.google.com (wpaz17.hot.corp.google.com [172.24.198.81]) by smtp-out.google.com with ESMTP id p6CMVxCX025507; Tue, 12 Jul 2011 15:32:00 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1310509920; bh=SNtF3mdj59SibYio4oAXEuYYhkU=; h=From:To:Cc:Subject:Date:Message-Id; b=RxnKhySoWn97z6AeYyeHJ2jebWQqX8I2zd7uUEr3a2AHOsde4pkNPh/h7v9PyiTGF J2Z+sxC4pDICDCFagObeg== DomainKey-Signature: a=rsa-sha1; s=beta; d=google.com; c=nofws; q=dns; h=from:to:cc:subject:date:message-id:x-mailer; b=FP7utowrwCFbODnO+00IEQb4nksWeWx1CbVL5VN6nDYWwRJaYbhXrQD3Cy/+GnRxk llrbRKF70QoYMIpe1K7sg== Received: from conslugarocko.mtv.corp.google.com (conslugarocko.mtv.corp.google.com [172.18.102.26]) by wpaz17.hot.corp.google.com with ESMTP id p6CMVvWR009910; Tue, 12 Jul 2011 15:31:58 -0700 Received: by conslugarocko.mtv.corp.google.com (Postfix, from userid 115684) id 8EE0723432E; Tue, 12 Jul 2011 15:31:57 -0700 (PDT) From: Todd Poynor To: davinci-linux-open-source@linux.davincidsp.com Subject: [PATCH 1/4] ARM: davinci: Check for NULL return from irq_alloc_generic_chip Date: Tue, 12 Jul 2011 15:31:50 -0700 Message-Id: <1310509910-4244-1-git-send-email-toddpoynor@google.com> X-Mailer: git-send-email 1.7.3.1 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110712_183218_437992_4423573B X-CRM114-Status: GOOD ( 11.12 ) X-Spam-Score: -1.7 (-) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-1.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [74.125.121.67 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.7 FRT_TODAY2 BODY: ReplaceTags: Today (2) -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Cc: Kevin Hilman , Todd Poynor , Sekhar Nori , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 12 Jul 2011 22:33:11 +0000 (UTC) Signed-off-by: Todd Poynor --- arch/arm/mach-davinci/irq.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-davinci/irq.c b/arch/arm/mach-davinci/irq.c index bfe68ec..ab7f688 100644 --- a/arch/arm/mach-davinci/irq.c +++ b/arch/arm/mach-davinci/irq.c @@ -52,6 +52,13 @@ davinci_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) struct irq_chip_type *ct; gc = irq_alloc_generic_chip("AINTC", 1, irq_start, base, handle_edge_irq); + + if (!gc) { + pr_err("%s: irq_alloc_generic_chip for IRQ %u failed\n", + __func__, irq_start); + return; + } + ct = gc->chip_types; ct->chip.irq_ack = irq_gc_ack; ct->chip.irq_mask = irq_gc_mask_clr_bit;