From: John Crispin <blogic@openwrt.org>
To: Dan Carpenter <dan.carpenter@oracle.com>,
Felix Fietkau <nbd@openwrt.org>
Cc: Matthias Brugger <matthias.bgg@gmail.com>,
netdev@vger.kernel.org, kernel-janitors@vger.kernel.org,
linux-mediatek@lists.infradead.org
Subject: Re: [patch 1/2 net-next] mediatek: checking for IS_ERR() instead of NULL
Date: Tue, 15 Mar 2016 07:27:47 +0000 [thread overview]
Message-ID: <56E7B973.4050604@openwrt.org> (raw)
In-Reply-To: <20160315071849.GH13560@mwanda>
On 15/03/2016 08:18, Dan Carpenter wrote:
> of_phy_connect() returns NULL on error, it never returns error pointers.
>
> Fixes: 656e705243fd ('net-next: mediatek: add support for MT7623 ethernet')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
Acked-by: John Crispin <blogic@openwrt.org>
Thanks !
> diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> index ba3afa5..9759fe5 100644
> --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
> @@ -186,9 +186,9 @@ static int mtk_phy_connect_node(struct mtk_eth *eth, struct mtk_mac *mac,
>
> phydev = of_phy_connect(eth->netdev[mac->id], phy_node,
> mtk_phy_link_adjust, 0, phy_mode);
> - if (IS_ERR(phydev)) {
> + if (!phydev) {
> dev_err(eth->dev, "could not connect to PHY\n");
> - return PTR_ERR(phydev);
> + return -ENODEV;
> }
>
> dev_info(eth->dev,
>
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
>
next prev parent reply other threads:[~2016-03-15 7:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-15 7:18 [patch 1/2 net-next] mediatek: checking for IS_ERR() instead of NULL Dan Carpenter
2016-03-15 7:27 ` John Crispin [this message]
2016-03-18 22:31 ` 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=56E7B973.4050604@openwrt.org \
--to=blogic@openwrt.org \
--cc=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=nbd@openwrt.org \
--cc=netdev@vger.kernel.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