From patchwork Wed Dec 14 20:55:56 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 5727 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 04EC023E0C for ; Wed, 14 Dec 2011 20:56:23 +0000 (UTC) Received: from mail-ee0-f52.google.com (mail-ee0-f52.google.com [74.125.83.52]) by fiordland.canonical.com (Postfix) with ESMTP id E3E7BA180CA for ; Wed, 14 Dec 2011 20:56:22 +0000 (UTC) Received: by eeke52 with SMTP id e52so1446019eek.11 for ; Wed, 14 Dec 2011 12:56:22 -0800 (PST) Received: by 10.204.156.208 with SMTP id y16mr62314bkw.72.1323896182640; Wed, 14 Dec 2011 12:56:22 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.205.129.2 with SMTP id hg2cs20693bkc; Wed, 14 Dec 2011 12:56:22 -0800 (PST) Received: by 10.213.25.201 with SMTP id a9mr308726ebc.20.1323896180411; Wed, 14 Dec 2011 12:56:20 -0800 (PST) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com. [207.126.144.149]) by mx.google.com with SMTP id q28si3208129eea.48.2011.12.14.12.56.13 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 14 Dec 2011 12:56:20 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.149; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.149 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKTukNa1YEh32ehPnRoTD26VEOaFTTO3nP@postini.com; Wed, 14 Dec 2011 20:56:19 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id D293169; Wed, 14 Dec 2011 20:56:00 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 72EE465; Wed, 14 Dec 2011 20:27:50 +0000 (GMT) Received: from exdcvycastm003.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm003", Issuer "exdcvycastm003" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id E8E51A8072; Wed, 14 Dec 2011 21:55:54 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.1) with Microsoft SMTP Server (TLS) id 8.3.83.0; Wed, 14 Dec 2011 21:56:02 +0100 From: Linus Walleij To: , Rob Herring , Thomas Gleixner Cc: Linus Walleij , Rob Herring , Thomas Gleixner Subject: [PATCH] irq: fix crash due to op-less irq domains Date: Wed, 14 Dec 2011 21:55:56 +0100 Message-ID: <1323896156-20692-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.3.2 MIME-Version: 1.0 From: Linus Walleij IRQ domains without ops does not work anymore after commit "irq: support domains with non-zero hwirq base", since the check dereferences domain->ops->to_irq without checking of domain->ops are NULL. This makes U300 (and probably most other systems using the PL190 VIC) boot again. Cc: Rob Herring Cc: Thomas Gleixner Signed-off-by: Linus Walleij --- include/linux/irqdomain.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/include/linux/irqdomain.h b/include/linux/irqdomain.h index 99834e58..78a1e66 100644 --- a/include/linux/irqdomain.h +++ b/include/linux/irqdomain.h @@ -74,7 +74,7 @@ struct irq_domain { static inline unsigned int irq_domain_to_irq(struct irq_domain *d, unsigned long hwirq) { - if (d->ops->to_irq) + if (d->ops && d->ops->to_irq) return d->ops->to_irq(d, hwirq); if (WARN_ON(hwirq < d->hwirq_base)) return 0;