From patchwork Sat Jan 6 13:34:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= X-Patchwork-Id: 13512695 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 F1D60C46CD2 for ; Sat, 6 Jan 2024 13:35:18 +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=OvHlut+OElDgdgmm8saz4VbhHKoeJ7f/yeVQhKEJksI=; b=blOQ6lqqakFw+L KUInAU8qvMCgAjMiFC632G0SYNuAIYf0kf5gEPJqoSMstCqcxbYbLIPf7w93y3NlswsuneNY9tFZF Ovz0rsAeyHjn3yjEk2BdcOoL2NkVZ5wqN1B2o22/WjhMizie+fXdz7xktrL9j7ICxOmc4ZyLcJctr EN0i8f0Q2LJ0eG911/GMoCBhb5KNrGMLwICrEvl6M8q8sLNef98eCRTZcUg2sO07oiXcVGqMVYxJf sy9Xt/fvASY0bRrYVK/1/Yl/ZJVcwHRBmjwRN7JwpZZxx/0Cn0pIpQqW7q7uAHO3dO+TStCziIAMX QQM1gA/nqe9mMRYY1dkQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rM6p4-001MRZ-10; Sat, 06 Jan 2024 13:34:46 +0000 Received: from ams.source.kernel.org ([2604:1380:4601:e00::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rM6p0-001MQY-1o for linux-arm-kernel@lists.infradead.org; Sat, 06 Jan 2024 13:34:44 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by ams.source.kernel.org (Postfix) with ESMTP id 1D8DCB81DEC; Sat, 6 Jan 2024 13:34:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4785AC433C8; Sat, 6 Jan 2024 13:34:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704548076; bh=Mh7Tjmn58tpzvDk6szE0G7B5YY29XWuISdIGGbbZZRo=; h=From:To:Cc:Subject:Date:From; b=DU65tPTocy0xL3Izd+YnEDfz0yxgMvcLyKce47gXuHub/ccdb08jacDH072hRUSyj Yn9VXDzbAbcphJG8JODqGHw5/xeZbfV1jNyvvmjjL1oGJysr7eiONSCoxzswcPqDdC 981fqZBc/6KdYaL+s4uVlzqxijHpevoXWKKDchLdjWxaiws2MMsBMfdj9utCfDgiuP 06tcfIUhF8ccUanREM6xqAfaA/MYOAO5IUTkE+mtz/NesZpzV1FkNnBKFUhqO55pG0 51KQYRjA34lWOSqsv2gw/BHYr2oxigGKM+etPGfvzcT/YvZabp3b8IaTJWY5+fwUNS ZdT4qvm1KpVug== From: =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= To: "Bjorn Helgaas" , "Thippeswamy Havalige" , "Bharat Kumar Gogada" Cc: "Michal Simek" , "Lorenzo Pieralisi" , "Rob Herring" , "Dan Carpenter" , linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH] PCI: xilinx-xdma: Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq() Date: Sat, 6 Jan 2024 13:34:33 +0000 Message-ID: <20240106133433.41130-1-kwilczynski@kernel.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240106_053442_749745_91D1364A X-CRM114-Status: GOOD ( 10.85 ) 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 The error paths that follow calls to the devm_request_irq() functions within the xilinx_pl_dma_pcie_setup_irq() reference an uninitialized symbol each that also so happens to be incorrect. Thus, fix this omission and reference the correct variable when invoking a given dev_err() function following an error. This problem was found using smatch via the 0-DAY CI Kernel Test service: drivers/pci/controller/pcie-xilinx-dma-pl.c:638 xilinx_pl_dma_pcie_setup_irq() error: uninitialized symbol 'irq'. drivers/pci/controller/pcie-xilinx-dma-pl.c:645 xilinx_pl_dma_pcie_setup_irq() error: uninitialized symbol 'irq'. Fixes: 8d786149d78c ("PCI: xilinx-xdma: Add Xilinx XDMA Root Port driver") Link: https://lore.kernel.org/oe-kbuild/202312120248.5DblxkBp-lkp@intel.com/ Reported-by: kernel test robot Reported-by: Dan Carpenter Closes: https://lore.kernel.org/r/202312120248.5DblxkBp-lkp@intel.com/ Signed-off-by: Krzysztof WilczyƄski --- drivers/pci/controller/pcie-xilinx-dma-pl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/pcie-xilinx-dma-pl.c b/drivers/pci/controller/pcie-xilinx-dma-pl.c index 2f7d676c683c..96aedc85802a 100644 --- a/drivers/pci/controller/pcie-xilinx-dma-pl.c +++ b/drivers/pci/controller/pcie-xilinx-dma-pl.c @@ -635,14 +635,14 @@ static int xilinx_pl_dma_pcie_setup_irq(struct pl_dma_pcie *port) err = devm_request_irq(dev, port->intx_irq, xilinx_pl_dma_pcie_intx_flow, IRQF_SHARED | IRQF_NO_THREAD, NULL, port); if (err) { - dev_err(dev, "Failed to request INTx IRQ %d\n", irq); + dev_err(dev, "Failed to request INTx IRQ %d\n", port->intx_irq); return err; } err = devm_request_irq(dev, port->irq, xilinx_pl_dma_pcie_event_flow, IRQF_SHARED | IRQF_NO_THREAD, NULL, port); if (err) { - dev_err(dev, "Failed to request event IRQ %d\n", irq); + dev_err(dev, "Failed to request event IRQ %d\n", port->irq); return err; }