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: 159546 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp2035385vqb; Mon, 30 Oct 2023 00:28:33 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGnpupg1RG3npmfoMEW4XGkS18Vr+RQU/zXqR1fY+SJz99aQpy+XPFu2pcIn63mMgD1KTwq X-Received: by 2002:a05:6358:7252:b0:168:d31f:9fe3 with SMTP id i18-20020a056358725200b00168d31f9fe3mr12198795rwa.23.1698650913502; Mon, 30 Oct 2023 00:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698650913; cv=none; d=google.com; s=arc-20160816; b=tg8nXrAmkZGzzgKtkdAx2nUlgXNC4FMGH0Q1CWtAkd57W6gJr58N5Mg2vvtVvNtIdw zExF9Aq1SB4Gp72UvV8kHH441jdRm3zN+ScZC85xD2R/Xrv9lfDLvCFrZQ4Pn4p28xdD gRS3bTu4RIsquXY6BSKyakRlwfB+jtRHazzWP9F8tFA2MzYGWYB8BuQB+ZIh1XwGSZdj WQuscxsjkWaMAPF2tIExbqpheoMeIoossR3gN/Wos/Pdg0gpjpDVTxVc+jR6dbq0UWOF mhSNWffBO3a4thGVHoI33ho/4/IqKcoBHQTUWd0XtMrSOlp484xtTjSSzKuCoDV/pVh/ Iksg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=k8xJjWrcWKXPldA9YKlYtBPXjtNfajVMGGZoYYMVxIc=; fh=R+vuqZ/pM9NZEMEA0Z44iCURI9OU4pqn0ZUGlCVnfkI=; b=XxIpaGItSoQWI7kejdBKIJoRuwTO+0NKBa08EAM4NCMXAuKbJsU0ljPFm6hbGdlKrW qo/TV7GEJMGYFuHbSPUE7jhtgBqyA0bObl4IKfAdTrEYPqNAOvab1pMObAGvaZD2Ef+0 hJ3cbsssxLXLxjvdQ4JM+Np2OD/dOUaFwLP9epVJ0fOVm6DP2YQyyXFMR5PD8D/gt8Q1 nvtJNB8BDPC9G3den/WEKeyWWOmqgourbqDUB6Q1gDBpHOl+C1zBFvk4/HjVLemz73iV bZyKkVWmVjho/RumLY4JzLrK2ZD4JpVAdrh9gw4v0N4TXPgvE2sjmJ1B3OmHBsNfspWq 8+8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=tQ9jPywQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id e20-20020a656794000000b005b896ecd1efsi4667035pgr.172.2023.10.30.00.28.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 00:28:33 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=tQ9jPywQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id CE6B9805000F; Mon, 30 Oct 2023 00:28:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231878AbjJ3H2U (ORCPT + 32 others); Mon, 30 Oct 2023 03:28:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229568AbjJ3H2T (ORCPT ); Mon, 30 Oct 2023 03:28:19 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 939D9A2; Mon, 30 Oct 2023 00:28:16 -0700 (PDT) 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-Spam-Status: No, score=-0.9 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Mon, 30 Oct 2023 00:28:30 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1781164580391056803 X-GMAIL-MSGID: 1781164580391056803 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);