From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B6886C46CD2 for ; Sat, 6 Jan 2024 11:40:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=l2uc+hoZtZPOMl3Rjgpjq+Ssse2f5l6yFxci+mA7wNg=; b=aIU77c6jqohN9A /1tjcN4f3kLlNn1U5L1Z8rWT/zgoWKbxXtUL8Yzi3biOVjv6SDnWQ5682Di5/Am5DLfJma0t7gG/i kepTKAG/JSOL/8ggw0RoCHsDp8ptRfo9GT9whCV9N8QDMGyDBrCcCO7d8r7whrMf7+4elfiE2nCfB XoZT2mJjRysMt2R7D0GMBAhZI7JUXvglIDvUaY75n+dgJFdfQJ5DzyJ0MdW3fZWTBqbxuOyPPa+OE 2IOhwAHXQGSRz1y4fJXhkZJJf/qnnPrf8GkHrtEt/+2IFcgQMqerU+ZX3L3N0owdxMS/08DXXD88K WA7fmxumqMvzuIwW6W0g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rM51W-0016Pu-0n; Sat, 06 Jan 2024 11:39:30 +0000 Received: from mail-oi1-f178.google.com ([209.85.167.178]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rM51T-0016PZ-2k for linux-arm-kernel@lists.infradead.org; Sat, 06 Jan 2024 11:39:29 +0000 Received: by mail-oi1-f178.google.com with SMTP id 5614622812f47-3bb53e20a43so438142b6e.1 for ; Sat, 06 Jan 2024 03:39:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704541166; x=1705145966; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=W4aBvxAPfagC6kuMJsXEP+HsUh4f67uuppDzujaVx5Y=; b=Il04f8QU0aeAz7xPzjsJiBx91UY+fKJtTULrK2NIwLDpVWcG9cqlBBl5K/t78DeA/d QiZHI/vRFG4cJ2U1nUU6O/W2Nw4VJB7+F/Fq5sWxcxguQ1fBHjB9Ap2HCOt0eUmEsgA9 ES8nCUpNk2kLuGQjbpBXhk0huTDyhh9WCkOPFtTptMtOXSNoaLViPIRk4YCUHCDZog1c 3V6iXs9bX0ia685W9KaqwXxXd6h9cLzH1s6SwbZ/5Rhy7HDZK5HATuK3cIgKlHg757av +wfVnmhMYSHnPynboVW2OjoR6515syFD9bb04pbgs+1oEPsQvgtjjS90sFvhEhD19MYK bnyg== X-Gm-Message-State: AOJu0YxHSVagvO4fYg7pzz955rMTyTWBVxN/+dVOusESk65e7k3YO8x9 EZ4uukroFVB9a5AA+tOF1fE= X-Google-Smtp-Source: AGHT+IHtt7Ebhm64abLBP+hiZj3KfFPWNDsN+KAlSQP0xK1nAEoWCbzhDv2unHiitrskCWf22gjd1Q== X-Received: by 2002:a05:6808:f8a:b0:3bd:21f5:4889 with SMTP id o10-20020a0568080f8a00b003bd21f54889mr531743oiw.5.1704541166284; Sat, 06 Jan 2024 03:39:26 -0800 (PST) Received: from localhost (fpd11144dd.ap.nuro.jp. [209.17.68.221]) by smtp.gmail.com with ESMTPSA id w6-20020aa78586000000b006d9b38f2e75sm2894625pfn.32.2024.01.06.03.39.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 03:39:25 -0800 (PST) Date: Sat, 6 Jan 2024 20:39:23 +0900 From: Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= To: Harshit Mogalapalli Cc: Lorenzo Pieralisi , Rob Herring , Bjorn Helgaas , Michal Simek , Thippeswamy Havalige , Bharat Kumar Gogada , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org, error27@gmail.com Subject: Re: [PATCH next] PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain() Message-ID: <20240106113923.GA3450972@rocinante> References: <20231030072757.3236546-1-harshit.m.mogalapalli@oracle.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231030072757.3236546-1-harshit.m.mogalapalli@oracle.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240106_033928_000224_169219B9 X-CRM114-Status: GOOD ( 21.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hello, > Return -ENOMEM instead of zero(success) when it fails to get IRQ domain. > > Fixes: 8d786149d78c ("PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver") > Signed-off-by: Harshit Mogalapalli > --- > This is found with smatch and the patch is only compile tested. > --- > drivers/pci/controller/pcie-xilinx-dma-pl.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/controller/pcie-xilinx-dma-pl.c > index 2f7d676c683c..52f3211d11cd 100644 > --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c > +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c > @@ -576,7 +576,7 @@ static int xilinx_pl_dma_pcie_init_irq_domain(struct pl_dma_pcie *port) > &intx_domain_ops, port); > if (!port->intx_domain) { > dev_err(dev, "Failed to get a INTx IRQ domain\n"); > - return PTR_ERR(port->intx_domain); > + return -ENOMEM; > } This looks good. However, there is probably another issue here on the failure path. I don't see any of_node_put() to release the pcie_intc_node taken at the top of the xilinx_pl_dma_pcie_init_irq_domain() function. I would imagine a similar approach to the error handling as what we can see from xilinx_cpm_pcie_init_irq_domain() function in the older driver. Thippeswamy, can you have a look and see if this can be improved? I would love to get a fix before Bjorn sends a Pull Request for the next release. Krzysztof _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel