lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3285a03b9b3b6b6c8fa15f2bdc3a7d11386283af.1737215423.git.christophe.jaillet@wanadoo.fr>
Date: Sat, 18 Jan 2025 16:51:02 +0100
From: Christophe JAILLET <christophe.jaillet@...adoo.fr>
To: Basavaraj Natikar <Basavaraj.Natikar@....com>,
	Vinod Koul <vkoul@...nel.org>
Cc: linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org,
	Christophe JAILLET <christophe.jaillet@...adoo.fr>,
	dmaengine@...r.kernel.org
Subject: [PATCH 2/3] dmaengine: ptdma: Slightly simplify error handling in pt_pci_probe()

'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@...adoo.fr>
---
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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ