From nobody Wed Feb 11 03:24:41 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BD65BC77B7C for ; Wed, 10 May 2023 16:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229867AbjEJQeO (ORCPT ); Wed, 10 May 2023 12:34:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjEJQeK (ORCPT ); Wed, 10 May 2023 12:34:10 -0400 Received: from outpost1.zedat.fu-berlin.de (outpost1.zedat.fu-berlin.de [130.133.4.66]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B320D6A52 for ; Wed, 10 May 2023 09:34:00 -0700 (PDT) Received: from inpost2.zedat.fu-berlin.de ([130.133.4.69]) by outpost.zedat.fu-berlin.de (Exim 4.95) with esmtps (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1pwml7-001PDV-C6; Wed, 10 May 2023 18:33:45 +0200 Received: from p57bd9793.dip0.t-ipconnect.de ([87.189.151.147] helo=z6.fritz.box) by inpost2.zedat.fu-berlin.de (Exim 4.95) with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (envelope-from ) id 1pwml7-000RlD-5t; Wed, 10 May 2023 18:33:45 +0200 Received: from glaubitz by z6.fritz.box with local (Exim 4.96) (envelope-from ) id 1pwml6-000BDK-1n; Wed, 10 May 2023 18:33:44 +0200 From: John Paul Adrian Glaubitz Cc: John Paul Adrian Glaubitz , Thomas Gleixner , Marc Zyngier , Rich Felker , Jason Cooper , linux-kernel@vger.kernel.org Subject: [PATCH] irqchip/jcore-aic: Fix missing allocation of IRQ descriptors Date: Wed, 10 May 2023 18:33:42 +0200 Message-Id: <20230510163343.43090-1-glaubitz@physik.fu-berlin.de> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Original-Sender: glaubitz@physik.fu-berlin.de X-Originating-IP: 87.189.151.147 X-ZEDAT-Hint: PO To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" The initialization function for the J-Core AIC aic_irq_of_init() is currently missing the call to irq_alloc_descs() which allocates and initializes all the IRQ descriptors. Add missing function call and return the error code from irq_alloc_descs() in case the allocation fails. Fixes: 981b58f66cfc ("irqchip/jcore-aic: Add J-Core AIC driver") Signed-off-by: John Paul Adrian Glaubitz Tested-by: Rob Landley --- drivers/irqchip/irq-jcore-aic.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/irqchip/irq-jcore-aic.c b/drivers/irqchip/irq-jcore-ai= c.c index 5f47d8ee4ae3..b9dcc8e78c75 100644 --- a/drivers/irqchip/irq-jcore-aic.c +++ b/drivers/irqchip/irq-jcore-aic.c @@ -68,6 +68,7 @@ static int __init aic_irq_of_init(struct device_node *nod= e, unsigned min_irq =3D JCORE_AIC2_MIN_HWIRQ; unsigned dom_sz =3D JCORE_AIC_MAX_HWIRQ+1; struct irq_domain *domain; + int ret; =20 pr_info("Initializing J-Core AIC\n"); =20 @@ -100,6 +101,12 @@ static int __init aic_irq_of_init(struct device_node *= node, jcore_aic.irq_unmask =3D noop; jcore_aic.name =3D "AIC"; =20 + ret =3D irq_alloc_descs(-1, min_irq, dom_sz - min_irq, + of_node_to_nid(node)); + + if (ret < 0) + return ret; + domain =3D irq_domain_add_legacy(node, dom_sz - min_irq, min_irq, min_irq, &jcore_aic_irqdomain_ops, &jcore_aic); --=20 2.39.2