From patchwork Tue Jul 12 22:42:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Poynor X-Patchwork-Id: 969552 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6CMgNns009108 for ; Tue, 12 Jul 2011 22:42:23 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754932Ab1GLWmW (ORCPT ); Tue, 12 Jul 2011 18:42:22 -0400 Received: from smtp-out.google.com ([74.125.121.67]:53291 "EHLO smtp-out.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753934Ab1GLWmV (ORCPT ); Tue, 12 Jul 2011 18:42:21 -0400 Received: from kpbe13.cbf.corp.google.com (kpbe13.cbf.corp.google.com [172.25.105.77]) by smtp-out.google.com with ESMTP id p6CMgFTL007230; Tue, 12 Jul 2011 15:42:15 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1310510535; bh=sFrEsDgGevQW4mjL+7ptqWePmfM=; h=From:To:Cc:Subject:Date:Message-Id; b=xUSWfvpy84UCSLbacZRKAj9k0NFIETtDg5NoHoflC06AvSCrgfy3MUwxifVMuQCL+ Z0st8gLTdNE2JFFQplgRg== 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=gD3V2vbDxqZ/IWl3Ow/qCRm67fprPnVNrtZ9jqjxFDBdWJTjT+a631q8ZrGrjH2dC mt2LAoagrO0JWG3XJeEXw== Received: from conslugarocko.mtv.corp.google.com (conslugarocko.mtv.corp.google.com [172.18.102.26]) by kpbe13.cbf.corp.google.com with ESMTP id p6CMg8F1013179; Tue, 12 Jul 2011 15:42:08 -0700 Received: by conslugarocko.mtv.corp.google.com (Postfix, from userid 115684) id EC4B123432E; Tue, 12 Jul 2011 15:42:07 -0700 (PDT) From: Todd Poynor To: Tony Lindgren Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Todd Poynor Subject: [PATCH 4/4] ARM: OMAP2+: Check NULL return from irq_alloc_generic_chip Date: Tue, 12 Jul 2011 15:42:05 -0700 Message-Id: <1310510525-4786-1-git-send-email-toddpoynor@google.com> X-Mailer: git-send-email 1.7.3.1 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.6 (demeter2.kernel.org [140.211.167.43]); Tue, 12 Jul 2011 22:42:23 +0000 (UTC) Signed-off-by: Todd Poynor --- arch/arm/mach-omap2/irq.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/arch/arm/mach-omap2/irq.c b/arch/arm/mach-omap2/irq.c index 3af2b7a..acbb05c 100644 --- a/arch/arm/mach-omap2/irq.c +++ b/arch/arm/mach-omap2/irq.c @@ -129,6 +129,13 @@ omap_alloc_gc(void __iomem *base, unsigned int irq_start, unsigned int num) gc = irq_alloc_generic_chip("INTC", 1, irq_start, base, handle_level_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 = omap_mask_ack_irq; ct->chip.irq_mask = irq_gc_mask_disable_reg;