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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56B613D3.2070709@openwrt.org>
Date:	Sat, 6 Feb 2016 16:40:03 +0100
From:	John Crispin <blogic@...nwrt.org>
To:	weiyj_lk@....com, Ralf Baechle <ralf@...ux-mips.org>,
	Matthias Brugger <matthias.bgg@...il.com>
Cc:	linux-mips@...ux-mips.org,
	Wei Yongjun <yongjun_wei@...ndmicro.com.cn>,
	linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] MIPS: pci-mt7620: Fix return value check in
 mt7620_pci_probe()


On 06/02/2016 15:24, weiyj_lk@....com wrote:
> From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
> 
> In case of error, the function devm_ioremap_resource() returns
> ERR_PTR() and never returns NULL. The NULL test in the return
> value check should be replaced with IS_ERR().
> 
> Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Hi,

thanks for the fix.

Acked-by: John Crispin <blogic@...nwrt.org>

@Ralf: can you merge this via LMO with the next PR please ?

@mbgg: ignore the patch please it is for the legacy MIPS SoCs

	John

> ---
>  arch/mips/pci/pci-mt7620.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/mips/pci/pci-mt7620.c b/arch/mips/pci/pci-mt7620.c
> index a009ee4..044c1cd 100644
> --- a/arch/mips/pci/pci-mt7620.c
> +++ b/arch/mips/pci/pci-mt7620.c
> @@ -297,12 +297,12 @@ static int mt7620_pci_probe(struct platform_device *pdev)
>  		return PTR_ERR(rstpcie0);
>  
>  	bridge_base = devm_ioremap_resource(&pdev->dev, bridge_res);
> -	if (!bridge_base)
> -		return -ENOMEM;
> +	if (IS_ERR(bridge_base))
> +		return PTR_ERR(bridge_base);
>  
>  	pcie_base = devm_ioremap_resource(&pdev->dev, pcie_res);
> -	if (!pcie_base)
> -		return -ENOMEM;
> +	if (IS_ERR(pcie_base))
> +		return PTR_ERR(pcie_base);
>  
>  	iomem_resource.start = 0;
>  	iomem_resource.end = ~0;
> 
> 
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@...ts.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ