From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9E26C207DF7 for ; Thu, 13 Aug 2026 04:20:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786594831; cv=none; b=lmaAX/XUGdjPQ5GKEtUUiS6jiJgNAy5DsXFoNz6tJF6Z1sVOArdXjfLn8yVAA1tUDYTkVWKEcAW7xsXHSK1CSe0N7ylF29o1U6zDZ2pWZAPp+AGYZVzPqf8tWeK/IqXCPZ2jp7O4igYQenn3899LQJiPRZbOO9CzW9rqrWftaRk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786594831; c=relaxed/simple; bh=gXKfQPPtANNZHJUProhwbQDCYeFtL1eTSoCCjA+/SqQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=pfS9H2IOWW5PVsUyFFunOi3OxB5tkzhw2Jg5/KrR4Wj/f2fNFwjX/GZB7XcVoiw7rRteFKA1vRXc4wnkGQOGMewsvOgqidQuNCscWb0RPLqrOgPMIa/MKapi4mjsbd/ECT8f//pU+gx/y002sIjbfuubAbaTx/hvKjZfjzK4u2g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=SBIH6qsU; arc=none smtp.client-ip=209.85.214.181 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SBIH6qsU" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-2cacb8416a1so20927805ad.1 for ; Wed, 12 Aug 2026 21:20:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786594830; x=1787199630; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=qvgR15Tx+UTRmIkTVdFC4whcGk/0e9sve+h3BkqQWSE=; b=SBIH6qsUr+cg0zVmlUClTwGkHH5SiptIZUucO0lWu3gltdHbYFhEadOxTHKKNK+JFr pVS/ArLGCe142EFjvw71LZt9opst/Pv0sof5796r8bQ2A5m2+U7zHQOZga1Ng4wtagSV daVpLudrbLVvMh21CWPLzEBeE8a16fJjHRHacpoeO9hxC9DqtxVE/TUjcddxhiEwMwZ7 kH3DYUCjcraxdve5/gcNB/4hkg1andWk1fZeY+v5k9Wc0UhJITBsASrrDHJA2W/FS3W4 GQxb9f9Hh7le3HjAPm9r3Nvbw/B6j9EMgTATJGf3wWFkqKKj751A2rZrF9WpJVhyFfCC HkuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786594830; x=1787199630; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=qvgR15Tx+UTRmIkTVdFC4whcGk/0e9sve+h3BkqQWSE=; b=cTIc9BRyfnUAyyhr6uGfSGBYrxDH0rhv9lgDhAzVEClTJ26Ze/4fn7wnZ5Q8uP5ORE xXNoWc6+slVyS81NrDl6lSIX6hHVKQpzIrIWBUmZDPc7w1FQMLLccpkWndh5/28SfJz4 cUdh1qtgV0rCim1dwKFmg6osrNmncizkHAYnhQTpZfkbOyo0JJi+WYt7PWMJCkzNX2xQ Xa9J4PTsocM/Yg8+MDeYChQvnUjiPJpsXInV9JgsBZyZJAvYQgS5GEltXOZcKaYU8DkA ctsO2AgstG/v0J7YofC9YxK0kBnrQXK6/kC4+Gs3aomXDTgFQPHPXdsfss0Z/FOz3/wS pi1Q== X-Forwarded-Encrypted: i=1; AHgh+RphggrYEhfSr/uvZgsaesGHXhH2xhKVTiEOKYGJ/PubiPc4be9t1bUhbwQqyPrkovn7Z9WMBr9+DLPrz0o=@vger.kernel.org X-Gm-Message-State: AOJu0YwQR6wKj+tP79lqX1PAR1UbDA/1sgz0t38LD2CmKN1BYZxY3g55 P39je7G+Jl2dH0ERLdoMlS74bMnFJvbP/hF7vEPVKRStxyd4Bqy4ERKc X-Gm-Gg: AR+sD10rX4ql/ulBINvPfZfjfoKj7DEOc1xTfqFMmP4edcXOOU6RC9wYhK1VjrLUKRw ObQk210neaiBqerabnMhjBkbZWlTvfkOQ4lXu5qy+ITkZ8pgHFfQVykGsKp2/5rMD0psDCn32jJ T61JYH8CqZN41cGh2cPw67NwCXTk2bkE7626DdBBKEq1T93c8D/05Tl5/PlCrtAY7cZH+ivqKH0 80iURmPiKLz6oYpG99nbqVFrOdSrU/xnuGs2GxA9dOEiYLV1QfhP5mBaX+nYSXjNufg30pSx8Xl FCs8HZT42jZHkdY4AKvsAYjgXs1akPllR6dwvAmw5BTCjA1zEzSwrzhk+kcsaSpRE74fs5DEPOu Xc3RNU9SpbcygdEYx3m2PTHxngStwSMwn/DR6nc+apU5IgiCMYyi3WreMdFik/JJRYl3A1FXZO+ veV3gR8S6V1VHbQujohlbJ8xjiomJneK7imqjYj97UVPavyFZS0rUihrz03N6gzAJ7GzYiEJhPr ajQugPXMNXSKgL2Pa6U8AR9E9uhJrtvngvp8bu0IseBRVY25ftwS7nb1FEKB7oJ41zQE+Hy4V+i r1tW X-Received: by 2002:a17:90a:ec8f:b0:38e:485c:ebd3 with SMTP id 98e67ed59e1d1-3931e291d2dmr3936264a91.15.1786594830016; Wed, 12 Aug 2026 21:20:30 -0700 (PDT) Received: from phuc-desktop.. ([183.91.15.56]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3931cd468cesm1700084a91.7.2026.08.12.21.20.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Aug 2026 21:20:29 -0700 (PDT) From: phucduc.bui@gmail.com To: Radhey Shyam Pandey , Andrew Lunn , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Michal Simek Cc: linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, bui duc phuc Subject: [PATCH v2 1/2] net: xilinx: axienet: Propagate errors from optional IRQ lookup Date: Thu, 13 Aug 2026 11:20:11 +0700 Message-ID: <20260813042012.17631-1-phucduc.bui@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: bui duc phuc platform_get_irq_optional() returns a positive IRQ number on success or a negative error code on failure. For an optional IRQ, -ENXIO indicates that no optional IRQ is available, while other errors should be propagated. Propagate all error codes returned by platform_get_irq_optional() other than -ENXIO. Another call to platform_get_irq_optional() in the same function already handles the return value this way. Apply the same error handling to this call site for consistency. Signed-off-by: bui duc phuc --- drivers/net/ethernet/xilinx/xilinx_axienet_main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c index fcf517069d16..d23e9796725d 100644 --- a/drivers/net/ethernet/xilinx/xilinx_axienet_main.c +++ b/drivers/net/ethernet/xilinx/xilinx_axienet_main.c @@ -2957,12 +2957,16 @@ static int axienet_probe(struct platform_device *pdev) lp->tx_irq = irq_of_parse_and_map(np, 0); of_node_put(np); lp->eth_irq = platform_get_irq_optional(pdev, 0); + if (lp->eth_irq < 0 && lp->eth_irq != -ENXIO) + return lp->eth_irq; } else { /* Check for these resources directly on the Ethernet node. */ lp->dma_regs = devm_platform_get_and_ioremap_resource(pdev, 1, NULL); lp->rx_irq = platform_get_irq(pdev, 1); lp->tx_irq = platform_get_irq(pdev, 0); lp->eth_irq = platform_get_irq_optional(pdev, 2); + if (lp->eth_irq < 0 && lp->eth_irq != -ENXIO) + return lp->eth_irq; } if (IS_ERR(lp->dma_regs)) { dev_err(&pdev->dev, "could not map DMA regs\n"); -- 2.43.0