[irqchip:,irq/irqchip-next] irqchip/loongson-liointc: Fix improper error handling in liointc_init()
Message ID | 166946966692.4906.8560659273979544805.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp4633742wrr; Sat, 26 Nov 2022 05:35:03 -0800 (PST) X-Google-Smtp-Source: AA0mqf4QuS+tqr3KDVnI1Xf5jkJC2uDnNMFB37hQohOYonBemYgyzTP8Xfs/OAgybLxf9ghVpkHR X-Received: by 2002:a63:5747:0:b0:46f:cbcb:761a with SMTP id h7-20020a635747000000b0046fcbcb761amr19970557pgm.82.1669469703012; Sat, 26 Nov 2022 05:35:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669469703; cv=none; d=google.com; s=arc-20160816; b=SoMr5mSeJ9XAaf0D6fSrenJKDbrKofY7n4WJ0nz1YH1sZN2gb6TD+DCB/YpCzKRj03 fVrwdfasxLTmPKL33GsgsGrr4UC6GzBMU4pfQ3ePdvPNaixIrucnBoUCfiJ7+KtJUSLv pkgFhBSaak+HRtv6PiBYGAm4QjBf40OX6YuoB6AfhzkKsZV1W2TQ3SXb2nc27wsFjtkH sS/o8LRBFCQYV2yDjs17RjKiwd1uq2ALrft2EO0IKaFI6B3siH0tqTGE3M2eGp9V8ctO +g6fySJwZB3TaxuaFeoxBWr2DcBMUiJD+/YoY89d9OezQE4E9g4aBCbHuc/WbEHajw4T V4/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=SmCYCGm0BvBvyxk+DEsBy+/4EqgLZrxk2j9sfi/hvfE=; b=Vl+XyHJNBjlFjQLT+dXryc+U7DJM8CtUCelb4oylnvaVHUqvCrnB3XCwESyiJmiNZg fn64YI8RB3H7JfAd5m8mhjbUATVHkkOLFFLn30RnIdgJyzpHPDZLwun3k/G4JRCx5faz DOT7SouucK4CSoBqO9GqehtzxvaRV26BcYnaE4W4q2gq5h4zTfLr8goVbvfTgB1izcBT T/zNNaL2CHVKQvhvMKMsQ0xeImb4cwSRuNk6PpSCHWqT9oX4VO+yHyqB6JuciMN9LHmV KaAK2MFI/W/xedaRumgh9URQvdQf24FTpJpO9LoRvsq93gx51MKq3C1/E2X68pvorhKA S7IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UzfQBnYh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=q02x4p5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b15-20020a170903228f00b00177568a0e53si7449632plh.252.2022.11.26.05.34.50; Sat, 26 Nov 2022 05:35:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=UzfQBnYh; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=q02x4p5k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229536AbiKZNee (ORCPT <rfc822;zxc52fgh@gmail.com> + 99 others); Sat, 26 Nov 2022 08:34:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34988 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbiKZNec (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 26 Nov 2022 08:34:32 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 08B751902C for <linux-kernel@vger.kernel.org>; Sat, 26 Nov 2022 05:34:31 -0800 (PST) Date: Sat, 26 Nov 2022 13:34:26 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1669469668; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmCYCGm0BvBvyxk+DEsBy+/4EqgLZrxk2j9sfi/hvfE=; b=UzfQBnYhZugsSNFGv4d2pyxJo+4c36wdtIv3Ow97wSopEu9aJVS1j5eQwEW8Vj34QAR+Kv PvylmQb3QXfTaoIExLYGbEEBhUWKcDgTR6++k8YvS0gEPyuDRPxQOesWtgRuYTp0N+IM9P sP7M9ZSd/mVW19gIojr9w3xMCBvhWnp5VUImGwZhZN+tNQwZigw/yPXMGJ42v+bvEEA9IL DHehWiWncOvtCQyIgPbDeVgkpDULxqDMiRqPSvwKhbe+f8jthbPxgAE+3p1KveSXhEK/bl ls/KKOnAa3fSBSIfstmhWU7p9EtkXQ3B4dzFFrtLqyqniTAdX72la3EXea1a7Q== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1669469668; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SmCYCGm0BvBvyxk+DEsBy+/4EqgLZrxk2j9sfi/hvfE=; b=q02x4p5k9tq5hDeBGsIAa+xR+9wDaNrIe74KomOqUIP/tM9fLir/FYdqMy70FMWI796ANT UDXNz0ilNNmMaLBA== From: "irqchip-bot for Liu Peibao" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/loongson-liointc: Fix improper error handling in liointc_init() Cc: Liu Peibao <liupeibao@loongson.cn>, Marc Zyngier <maz@kernel.org>, tglx@linutronix.de In-Reply-To: <20221104110712.23300-1-liupeibao@loongson.cn> References: <20221104110712.23300-1-liupeibao@loongson.cn> MIME-Version: 1.0 Message-ID: <166946966692.4906.8560659273979544805.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750565863075188428?= X-GMAIL-MSGID: =?utf-8?q?1750565863075188428?= |
Series |
[irqchip:,irq/irqchip-next] irqchip/loongson-liointc: Fix improper error handling in liointc_init()
|
|
Commit Message
tip-bot2 for Thomas Gleixner
Nov. 26, 2022, 1:34 p.m. UTC
The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: 4a60a3cdcf1875c965095eb9e22c3d12bbc5a53d Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4a60a3cdcf1875c965095eb9e22c3d12bbc5a53d Author: Liu Peibao <liupeibao@loongson.cn> AuthorDate: Fri, 04 Nov 2022 19:07:12 +08:00 Committer: Marc Zyngier <maz@kernel.org> CommitterDate: Sat, 26 Nov 2022 13:29:57 irqchip/loongson-liointc: Fix improper error handling in liointc_init() For cores less than 4, eg, loongson2k1000 with 2 cores, the of_property_match_string() may return with an error value, which causes that liointc could not work. At least isr0 is what should be checked like previous commit b2c4c3969fd7 ("irqchip/loongson-liointc: irqchip add 2.0 version") did. Fixes: 0858ed035a85 ("irqchip/loongson-liointc: Add ACPI init support") Signed-off-by: Liu Peibao <liupeibao@loongson.cn> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20221104110712.23300-1-liupeibao@loongson.cn --- drivers/irqchip/irq-loongson-liointc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-loongson-liointc.c b/drivers/irqchip/irq-loongson-liointc.c index 0da8716..c4584e2 100644 --- a/drivers/irqchip/irq-loongson-liointc.c +++ b/drivers/irqchip/irq-loongson-liointc.c @@ -207,10 +207,13 @@ static int liointc_init(phys_addr_t addr, unsigned long size, int revision, "reg-names", core_reg_names[i]); if (index < 0) - goto out_iounmap; + continue; priv->core_isr[i] = of_iomap(node, index); } + + if (!priv->core_isr[0]) + goto out_iounmap; } /* Setup IRQ domain */