[PATCH 2/3] dmaengine: ptdma: Slightly simplify error handling in pt_pci_probe()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'ret' can be non-zero, only if pt_core_init() was called a few lines above.
So move this test inside the same "if" to make things more obvious.

Signed-off-by: Christophe JAILLET <christophe.jaillet@xxxxxxxxxx>
---
Compile tested only
---
 drivers/dma/amd/ptdma/ptdma-pci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/amd/ptdma/ptdma-pci.c b/drivers/dma/amd/ptdma/ptdma-pci.c
index 7f12474bd39f..b25b6f7618c3 100644
--- a/drivers/dma/amd/ptdma/ptdma-pci.c
+++ b/drivers/dma/amd/ptdma/ptdma-pci.c
@@ -188,11 +188,11 @@ static int pt_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	dev_set_drvdata(dev, pt);
 
-	if (pt->dev_vdata)
+	if (pt->dev_vdata) {
 		ret = pt_core_init(pt);
-
-	if (ret)
-		goto e_free_irqs;
+		if (ret)
+			goto e_free_irqs;
+	}
 
 	return 0;
 
-- 
2.48.1





[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux