From patchwork Mon Oct 30 07:27:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshit Mogalapalli X-Patchwork-Id: 13440125 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 A5DC7C4332F for ; Mon, 30 Oct 2023 07:28:43 +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:MIME-Version:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=z99T4icrHqe1QczdWF41hz0E6mBPwLKaVkRMVa/Apd0=; b=L/XGV70tyr3B6Y CQZhjDo1dTUrUad3zmAqHopM/HqnFeWS3cKY3ydSLRV9LjufZYjhDXvumvvTgPnr1E8UixpRwn328 doulDyBBzfW6l56rwR2p0nlrABvNzZatQkTBHYzpJrcm65/Puif+tqNh0fVzrjiY11OrRexWjGvkI ABulxBSjTpUMseCwFFjW2tJoKBlmf0nNdgJqPGhpyW0kXlHDJj3RAkPDVq4fwjggGxNshjhKUGzoY Sq3ZjRViMynvbVSaD3CyUZe04ZIc/cStuDOcpEgqVTvzrFPbebwhicWu1pNeLmvoWK2bMMC5Nfm3f WsMzOH4N8teXLn7r88cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qxMh6-002lIe-31; Mon, 30 Oct 2023 07:28:16 +0000 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qxMh4-002lI3-1Q for linux-arm-kernel@lists.infradead.org; Mon, 30 Oct 2023 07:28:15 +0000 Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39U3ei0K021240; Mon, 30 Oct 2023 07:28:03 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding; s=corp-2023-03-30; bh=k8xJjWrcWKXPldA9YKlYtBPXjtNfajVMGGZoYYMVxIc=; b=tQ9jPywQInbVGR86ivd5swz3k7A1h2+qRtTPL2Dj993FTsRuYTxxMVMVLPWyMhauCqAw /vznMOdZqrMgIXKWUqoV63LwAoFWraj5ajN67TCf4tl7RJ+8UwnUtLU/G4JVC+zmW1FP YAImSJFSjrOjONWM6B9Pek/YGWadOlW4D1p4A/lkaIml5n6vlFs7juGHqubdwxSy+oKy pQh4tLw/0YdX0IO+KrEoCSJSloBb8semuvH8yxqo1h3gDVgENyRqf40+XqiPrcL1yYPa au/886ZasuTfYxR5EoFE/xB2jU87uT4p9qD/DOelaxUojzyr9ed8uejjLMsdnh6vkFt5 sg== Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.appoci.oracle.com [138.1.37.129]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3u0swtj3qv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Oct 2023 07:28:03 +0000 Received: from pps.filterd (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 39U73KFs029508; Mon, 30 Oct 2023 07:28:00 GMT Received: from pps.reinject (localhost [127.0.0.1]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3u0rr48pmb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 30 Oct 2023 07:28:00 +0000 Received: from phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39U7RxXZ029637; Mon, 30 Oct 2023 07:28:00 GMT Received: from ca-dev112.us.oracle.com (ca-dev112.us.oracle.com [10.129.136.47]) by phxpaimrmta03.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTP id 3u0rr48pm7-1; Mon, 30 Oct 2023 07:27:59 +0000 From: Harshit Mogalapalli To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , 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 Cc: dan.carpenter@linaro.org, kernel-janitors@vger.kernel.org, error27@gmail.com, harshit.m.mogalapalli@oracle.com Subject: [PATCH next] PCI: xilinx-xdma: Fix error code in xilinx_pl_dma_pcie_init_irq_domain() Date: Mon, 30 Oct 2023 00:27:57 -0700 Message-ID: <20231030072757.3236546-1-harshit.m.mogalapalli@oracle.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-30_05,2023-10-27_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxlogscore=940 suspectscore=0 malwarescore=0 phishscore=0 spamscore=0 adultscore=0 bulkscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310300055 X-Proofpoint-ORIG-GUID: wBOheiCvW2FrvX3aPqokHcQtzunkk3Yq X-Proofpoint-GUID: wBOheiCvW2FrvX3aPqokHcQtzunkk3Yq X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231030_002814_609399_73221BB3 X-CRM114-Status: GOOD ( 17.61 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; } irq_domain_update_bus_token(port->intx_domain, DOMAIN_BUS_WIRED);