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: <56F25B42.5030005@gmail.com>
Date:	Wed, 23 Mar 2016 10:00:50 +0100
From:	Matthias Brugger <matthias.bgg@...il.com>
To:	Vladimir Zapolskiy <vz@...ia.com>,
	"David S. Miller" <davem@...emloft.net>,
	Felix Fietkau <nbd@...nwrt.org>,
	John Crispin <blogic@...nwrt.org>
Cc:	netdev@...r.kernel.org, linux-mediatek@...ts.infradead.org,
	linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] net: mediatek: fix checking for NULL instead of IS_ERR()
 in .probe



On 23/03/16 00:06, Vladimir Zapolskiy wrote:
> devm_ioremap_resource() returns ERR_PTR() value on error, it never
> returns NULL, fix it and propagate the returned error upwards.
>
> Fixes: 656e705243fd ("net-next: mediatek: add support for MT7623 ethernet")
> Signed-off-by: Vladimir Zapolskiy <vz@...ia.com>
> ---

Reviewed-by: Matthias Brugger <mbrugger@...e.com>

>   drivers/net/ethernet/mediatek/mtk_eth_soc.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index 7f2126b..e0b68af 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -1690,8 +1690,8 @@ static int mtk_probe(struct platform_device *pdev)
>   		return -ENOMEM;
>
>   	eth->base = devm_ioremap_resource(&pdev->dev, res);
> -	if (!eth->base)
> -		return -EADDRNOTAVAIL;
> +	if (IS_ERR(eth->base))
> +		return PTR_ERR(eth->base);
>
>   	spin_lock_init(&eth->page_lock);
>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ