* [PATCH] powerpc/pasemi: Fix error handling in pasemi_dma_init
@ 2025-12-12 9:05 Miaoqian Lin
0 siblings, 0 replies; only message in thread
From: Miaoqian Lin @ 2025-12-12 9:05 UTC (permalink / raw)
To: Madhavan Srinivasan, Michael Ellerman, Nicholas Piggin,
Christophe Leroy (CS GROUP),
Miaoqian Lin, Olof Johansson, Jeff Garzik, linuxppc-dev,
linux-kernel
Cc: stable
Add missing pci_dev_put(iob_pdev) to drop the reference count
obtained by pci_get_device() in case of error.
Found via static analysis and code review.
Fixes: 8ee9d8577935 ("pasemi: DMA engine management library")
Cc: stable@vger.kernel.org
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
---
arch/powerpc/platforms/pasemi/dma_lib.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/pasemi/dma_lib.c b/arch/powerpc/platforms/pasemi/dma_lib.c
index 1be1f18f6f09..b824bfe97ce8 100644
--- a/arch/powerpc/platforms/pasemi/dma_lib.c
+++ b/arch/powerpc/platforms/pasemi/dma_lib.c
@@ -530,6 +530,7 @@ int pasemi_dma_init(void)
BUG();
pr_warn("Can't find DMA controller\n");
err = -ENODEV;
+ pci_dev_put(iob_pdev);
goto out;
}
dma_regs = map_onedev(dma_pdev, 0);
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-12-12 9:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-12-12 9:05 [PATCH] powerpc/pasemi: Fix error handling in pasemi_dma_init Miaoqian Lin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®