Message ID | aa06e8316eb36342ba36e01bf74ab469415b80e5.1737215423.git.christophe.jaillet@wanadoo.fr (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [1/3] dmaengine: ptdma: Fix an error handling parth in pt_pci_probe() | expand |
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);
'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@wanadoo.fr> --- Compile tested only --- drivers/dma/amd/ptdma/ptdma-pci.c | 3 --- 1 file changed, 3 deletions(-)