Skip to content

Commit 7aa5f8f

Browse files
committed
PCI: xilinx-xdma: Fix uninitialized symbols in xilinx_pl_dma_pcie_setup_irq()
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: 8d78614 ("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 <lkp@intel.com> Reported-by: Dan Carpenter <dan.carpenter@linaro.org> Closes: https://lore.kernel.org/r/202312120248.5DblxkBp-lkp@intel.com/ Signed-off-by: Krzysztof Wilczyński <kwilczynski@kernel.org>
1 parent b642e08 commit 7aa5f8f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/controller/pcie-xilinx-dma-pl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -635,14 +635,14 @@ static int xilinx_pl_dma_pcie_setup_irq(struct pl_dma_pcie *port)
635635
err = devm_request_irq(dev, port->intx_irq, xilinx_pl_dma_pcie_intx_flow,
636636
IRQF_SHARED | IRQF_NO_THREAD, NULL, port);
637637
if (err) {
638-
dev_err(dev, "Failed to request INTx IRQ %d\n", irq);
638+
dev_err(dev, "Failed to request INTx IRQ %d\n", port->intx_irq);
639639
return err;
640640
}
641641

642642
err = devm_request_irq(dev, port->irq, xilinx_pl_dma_pcie_event_flow,
643643
IRQF_SHARED | IRQF_NO_THREAD, NULL, port);
644644
if (err) {
645-
dev_err(dev, "Failed to request event IRQ %d\n", irq);
645+
dev_err(dev, "Failed to request event IRQ %d\n", port->irq);
646646
return err;
647647
}
648648

0 commit comments

Comments
 (0)