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] [day] [month] [year] [list]
Message-ID: <d28a5f5c-9430-11a7-2330-84e1e781fd1d@amd.com>
Date: Tue, 20 Aug 2024 08:29:22 -0700
From: Lizhi Hou <lizhi.hou@....com>
To: Yue Haibing <yuehaibing@...wei.com>, <brian.xu@....com>,
	<raj.kumar.rampelli@....com>, <vkoul@...nel.org>, <michal.simek@....com>,
	<sonal.santan@....com>, <max.zhen@....com>
CC: <dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] dmaengine: xilinx: xdma: Fix NULL vs IS_ERR() bug

Please see: 
https://lore.kernel.org/dmaengine/20240819193641.600176-1-harshit.m.mogalapalli@oracle.com/


Thanks,

Lizhi

On 8/20/24 06:28, Yue Haibing wrote:
> devm_regmap_init_mmio() never returns NULL pointer, it will
> return ERR_PTR() when it fails, so check it with IS_ERR().
>
> Fixes: 17ce252266c7 ("dmaengine: xilinx: xdma: Add xilinx xdma driver")
> Signed-off-by: Yue Haibing <yuehaibing@...wei.com>
> ---
>   drivers/dma/xilinx/xdma.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c
> index 718842fdaf98..44fae351f0a0 100644
> --- a/drivers/dma/xilinx/xdma.c
> +++ b/drivers/dma/xilinx/xdma.c
> @@ -1240,7 +1240,8 @@ static int xdma_probe(struct platform_device *pdev)
>   
>   	xdev->rmap = devm_regmap_init_mmio(&pdev->dev, reg_base,
>   					   &xdma_regmap_config);
> -	if (!xdev->rmap) {
> +	if (IS_ERR(xdev->rmap)) {
> +		ret = PTR_ERR(xdev->rmap);
>   		xdma_err(xdev, "config regmap failed: %d", ret);
>   		goto failed;
>   	}

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ