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>] [day] [month] [year] [list]
Message-Id: <20240425082803.829150-1-nichen@iscas.ac.cn>
Date: Thu, 25 Apr 2024 16:28:03 +0800
From: Chen Ni <nichen@...as.ac.cn>
To: James.Bottomley@...senPartnership.com,
	martin.petersen@...cle.com
Cc: linux-scsi@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Chen Ni <nichen@...as.ac.cn>
Subject: [PATCH] scsi: aha1740: use dma_mapping_error to check map errors

The return value of dma_map_single() should be checked by
dma_mapping_error(). Update the check accordingly.

Signed-off-by: Chen Ni <nichen@...as.ac.cn>
---
 drivers/scsi/aha1740.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/aha1740.c b/drivers/scsi/aha1740.c
index 3d18945abaf7..9768be6fc919 100644
--- a/drivers/scsi/aha1740.c
+++ b/drivers/scsi/aha1740.c
@@ -598,7 +598,7 @@ static int aha1740_probe (struct device *dev)
 	host->ecb_dma_addr = dma_map_single (&edev->dev, host->ecb,
 					     sizeof (host->ecb),
 					     DMA_BIDIRECTIONAL);
-	if (!host->ecb_dma_addr) {
+	if (dma_mapping_error(&edev->dev, host->ecb_dma_addr)) {
 		printk (KERN_ERR "aha1740_probe: Couldn't map ECB, giving up\n");
 		goto err_host_put;
 	}
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ