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: 970222 Received: from arroyo.ext.ti.com (arroyo.ext.ti.com [192.94.94.40]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6D46TQg001798 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 13 Jul 2011 04:06:56 GMT Received: from dlep36.itg.ti.com ([157.170.170.91]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id p6D46TZR012284 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 12 Jul 2011 23:06:29 -0500 Received: from linux.omap.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep36.itg.ti.com (8.13.8/8.13.8) with ESMTP id p6D46SJ1020052 for ; Tue, 12 Jul 2011 23:06:28 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id C829880659 for ; Tue, 12 Jul 2011 23:06:26 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp52.itg.ti.com (dflp52.itg.ti.com [128.247.22.96]) by linux.omap.com (Postfix) with ESMTP id CFD4A80626 for ; Tue, 12 Jul 2011 17:32:03 -0500 (CDT) Received: from white.ext.ti.com (white.ext.ti.com [192.94.93.38]) by dflp52.itg.ti.com (8.13.7/8.13.8) with ESMTP id p6CMW3mG001397 for ; Tue, 12 Jul 2011 17:32:03 -0500 (CDT) Received: from psmtp.com (na3sys009amx167.postini.com [74.125.149.93]) by white.ext.ti.com (8.13.7/8.13.7) with SMTP id p6CMW2He009672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 12 Jul 2011 17:32:02 -0500 Received: from smtp-out.google.com ([172.25.149.9]) (using TLSv1) by na3sys009amx167.postini.com ([74.125.148.10]) with SMTP; Tue, 12 Jul 2011 22:32:03 GMT 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-pstn-neptune: 0/0/0.00/0 X-pstn-levels: (S:71.37366/99.90000 CV:99.9000 FC:95.5390 LC:95.5390 R:95.9108 P:95.9108 M:97.0282 C:98.6951 ) X-pstn-settings: 2 (0.5000:0.5000) s cv gt3 gt2 gt1 r p m c X-pstn-addresses: from [35/1] X-Mailman-Approved-At: Tue, 12 Jul 2011 23:06:21 -0500 Cc: Todd Poynor , linux-arm-kernel@lists.infradead.org X-BeenThere: davinci-linux-open-source@linux.davincidsp.com 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: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com X-Greylist: Sender succeeded STARTTLS authentication, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 13 Jul 2011 04:06:56 +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;