From: blogic@openwrt.org (John Crispin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] net: mediatek: fix checking for NULL instead of IS_ERR() in .probe
Date: Wed, 23 Mar 2016 10:07:28 +0100 [thread overview]
Message-ID: <56F25CD0.5070806@openwrt.org> (raw)
In-Reply-To: <56F25B42.5030005@gmail.com>
On 23/03/2016 10:00, Matthias Brugger wrote:
>
>
> 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>
>
Acked-by: John Crispin <blogic@openwrt.org>
Thanks for the fix !
>> 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:07 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
2016-03-23 9:07 ` John Crispin [this message]
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=56F25CD0.5070806@openwrt.org \
--to=blogic@openwrt.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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