[PATCH 3/3] dmaengine: ptdma: Remove some dead code in pt_pci_remove()
From: Christophe JAILLET
Date: Sat Jan 18 2025 - 10:51:44 EST
'pt' can't be NULL when pt_pci_remove() is called. So remove a useless
test and save a few lines of code.
Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
Compile tested only
---
drivers/dma/amd/ptdma/ptdma-pci.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/dma/amd/ptdma/ptdma-pci.c b/drivers/dma/amd/ptdma/ptdma-pci.c
index b25b6f7618c3..25ad61265565 100644
--- a/drivers/dma/amd/ptdma/ptdma-pci.c
+++ b/drivers/dma/amd/ptdma/ptdma-pci.c
@@ -209,9 +209,6 @@ static void pt_pci_remove(struct pci_dev *pdev)
struct device *dev = &pdev->dev;
struct pt_device *pt = dev_get_drvdata(dev);
- if (!pt)
- return;
-
if (pt->dev_vdata)
pt_core_destroy(pt);
--
2.48.1