From: Matthias Brugger <matthias.bgg@gmail.com>
To: Vladimir Zapolskiy <vz@mleia.com>,
"David S. Miller" <davem@davemloft.net>,
Felix Fietkau <nbd@openwrt.org>,
John Crispin <blogic@openwrt.org>
Cc: netdev@vger.kernel.org, linux-mediatek@lists.infradead.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] net: mediatek: fix checking for NULL instead of IS_ERR() in .probe
Date: Wed, 23 Mar 2016 10:00:50 +0100 [thread overview]
Message-ID: <56F25B42.5030005@gmail.com> (raw)
In-Reply-To: <1458687964-9690-1-git-send-email-vz@mleia.com>
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@mleia.com>
> ---
Reviewed-by: Matthias Brugger <mbrugger@suse.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(ð->page_lock);
>
>
next prev parent reply other threads:[~2016-03-23 9:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-22 23:06 [PATCH] net: mediatek: fix checking for NULL instead of IS_ERR() in .probe Vladimir Zapolskiy
2016-03-23 9:00 ` Matthias Brugger [this message]
2016-03-23 9:07 ` John Crispin
2016-03-23 17:50 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56F25B42.5030005@gmail.com \
--to=matthias.bgg@gmail.com \
--cc=blogic@openwrt.org \
--cc=davem@davemloft.net \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.org \
--cc=vz@mleia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).