Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp1885562ybc; Wed, 20 Nov 2019 05:43:51 -0800 (PST) X-Google-Smtp-Source: APXvYqx8ceLZtV5BADhUtiVg4kav++9+flh33eMSQ6gGF6uNCxCnCtNBgdM0+VRzv80nTKNoTCVh X-Received: by 2002:a5d:6702:: with SMTP id o2mr3340044wru.339.1574257431653; Wed, 20 Nov 2019 05:43:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574257431; cv=none; d=google.com; s=arc-20160816; b=x3eea4rEMlLwGVoCP0v0/8nRUhfjlAV9T6SgF0NHC+rJEotLzNuubwhQagPU25MEvN DkzxaWp9DFEIAs+Eb6W7dwtjDieaBSopXwkTKlwsOLxpTbwEw60f4He1dkxubTvhgm+O 5RpVge7ufBdJGEIZwmTrZxgXKbPJjzoLJ1v2BYby2aH3QF7GYfViSBaXXMNGzwarV4Hu HH5yElNsKkDEQZQOhz6vzX7H+Cn/gFFzlJEzJFo56dJF2xoPT5U02ztWkgws9K4Wx20h +e8SGFeyMxx30V/xHeOzmj4K9Z+x1NUnFniGWuadqv+vje/r3l7x8ARpsl2d2gV7ZvqM AOfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=GC6T5byM/S03rxbA5tzYZCHwwCxHvFuL54l/SWwegjI=; b=o5lIBcbXpqYAPfhqyONWcCOBWL4kYjVPeFJQfV8//zAPecgZLDDfsafx2XhQThrp+7 bPdCzT9u71D4BHaZsycHE/yeqmYEc3FWTZc2Eiou5SXAlMSeqZVtRSJCOmtfxKBG4RUO +dL6aX3zQbFMSI4Ae4fo0nTEkBVJXKB86Ukx4cFGdK4y/reDFcGYwm1YYdIhilT78NJI iJHCivDuyDJSZoZ9ObDYK8tKEu8bTpdCOqnPfUdM46SLsk+aQ4j/+tazlir3GKDLVTxR utocz3cbEx6+w1ffuKlGicQcMRCKKZ6P7VTRKo41zRVPPZd7EOLKHxG41L1xA3WM6F7T O+QA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a20si15519350edn.178.2019.11.20.05.43.26; Wed, 20 Nov 2019 05:43:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728779AbfKTNXb (ORCPT + 99 others); Wed, 20 Nov 2019 08:23:31 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:56668 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728338AbfKTNVJ (ORCPT ); Wed, 20 Nov 2019 08:21:09 -0500 Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1iXPur-00076o-99; Wed, 20 Nov 2019 14:21:05 +0100 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id C86791C1A0D; Wed, 20 Nov 2019 14:21:02 +0100 (CET) Date: Wed, 20 Nov 2019 13:21:02 -0000 From: "tip-bot2 for Paul Cercueil" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip: ingenic: Error out if IRQ domain creation failed Cc: Paul Cercueil , Marc Zyngier , Ingo Molnar , Borislav Petkov , linux-kernel@vger.kernel.org In-Reply-To: <1570015525-27018-3-git-send-email-zhouyanjie@zoho.com> References: <1570015525-27018-3-git-send-email-zhouyanjie@zoho.com> MIME-Version: 1.0 Message-ID: <157425606271.12247.62239776985279233.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the irq/core branch of tip: Commit-ID: 52ecc87642f273a599c9913b29fd179c13de457b Gitweb: https://git.kernel.org/tip/52ecc87642f273a599c9913b29fd179c13de457b Author: Paul Cercueil AuthorDate: Wed, 02 Oct 2019 19:25:22 +08:00 Committer: Marc Zyngier CommitterDate: Sun, 10 Nov 2019 18:55:30 irqchip: ingenic: Error out if IRQ domain creation failed If we cannot create the IRQ domain, the driver should fail to probe instead of succeeding with just a warning message. Signed-off-by: Paul Cercueil Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/1570015525-27018-3-git-send-email-zhouyanjie@zoho.com --- drivers/irqchip/irq-ingenic.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-ingenic.c b/drivers/irqchip/irq-ingenic.c index 06fa810..d97a3a5 100644 --- a/drivers/irqchip/irq-ingenic.c +++ b/drivers/irqchip/irq-ingenic.c @@ -87,6 +87,14 @@ static int __init ingenic_intc_of_init(struct device_node *node, goto out_unmap_irq; } + domain = irq_domain_add_legacy(node, num_chips * 32, + JZ4740_IRQ_BASE, 0, + &irq_domain_simple_ops, NULL); + if (!domain) { + err = -ENOMEM; + goto out_unmap_base; + } + for (i = 0; i < num_chips; i++) { /* Mask all irqs */ writel(0xffffffff, intc->base + (i * CHIP_SIZE) + @@ -112,14 +120,11 @@ static int __init ingenic_intc_of_init(struct device_node *node, IRQ_NOPROBE | IRQ_LEVEL); } - domain = irq_domain_add_legacy(node, num_chips * 32, JZ4740_IRQ_BASE, 0, - &irq_domain_simple_ops, NULL); - if (!domain) - pr_warn("unable to register IRQ domain\n"); - setup_irq(parent_irq, &intc_cascade_action); return 0; +out_unmap_base: + iounmap(intc->base); out_unmap_irq: irq_dispose_mapping(parent_irq); out_free: