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-next>] [day] [month] [year] [list]
Message-Id: <20230705113912.16247-1-duminjie@vivo.com>
Date:   Wed,  5 Jul 2023 19:39:12 +0800
From:   Minjie Du <duminjie@...o.com>
To:     michal.simek@....com, Lizhi Hou <lizhi.hou@....com>,
        Brian Xu <brian.xu@....com>,
        Raj Kumar Rampelli <raj.kumar.rampelli@....com>,
        Vinod Koul <vkoul@...nel.org>,
        dmaengine@...r.kernel.org (open list:XILINX XDMA DRIVER),
        linux-arm-kernel@...ts.infradead.org (moderated list:ARM/ZYNQ
        ARCHITECTURE), linux-kernel@...r.kernel.org (open list)
Cc:     opensource.kernel@...o.com, Minjie Du <duminjie@...o.com>
Subject: [PATCH v2] dmaengine: xilinx: xdma: Fix Judgment of the return value

Fix: make IS_ERR() judge the devm_ioremap_resource() function return.

Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
Signed-off-by: Minjie Du <duminjie@...o.com>
---
 drivers/dma/xilinx/xdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
index 93ee298d5..ad5ff6335 100644
--- a/drivers/dma/xilinx/xdma.c
+++ b/drivers/dma/xilinx/xdma.c
@@ -892,7 +892,7 @@ static int xdma_probe(struct platform_device *pdev)
 	}
 
 	reg_base = devm_ioremap_resource(&pdev->dev, res);
-	if (!reg_base) {
+	if (IS_ERR(reg_base)) {
 		xdma_err(xdev, "ioremap failed");
 		goto failed;
 	}
-- 
2.39.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ