[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <d03bf1c6-3128-5575-b557-03d10d9ce1d7@linux.intel.com>
Date: Tue, 22 Jan 2019 11:15:46 -0600
From: Thor Thayer <thor.thayer@...ux.intel.com>
To: Atsushi Nemoto <atsushi.nemoto@...d.co.jp>, netdev@...r.kernel.org
Cc: Dalon Westergreen <dalon.westergreen@...el.com>
Subject: Re: [PATCH] net: altera_tse: fix connect_local_phy error path
On 1/21/19 2:26 AM, Atsushi Nemoto wrote:
> The connect_local_phy should return NULL (not negative errno) on
> error, since its caller expects it.
>
> Signed-off-by: Atsushi Nemoto <atsushi.nemoto@...d.co.jp>
> ---
> drivers/net/ethernet/altera/altera_tse_main.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/altera/altera_tse_main.c b/drivers/net/ethernet/altera/altera_tse_main.c
> index 02921d8..aa1d1f5 100644
> --- a/drivers/net/ethernet/altera/altera_tse_main.c
> +++ b/drivers/net/ethernet/altera/altera_tse_main.c
> @@ -714,8 +714,10 @@ static struct phy_device *connect_local_phy(struct net_device *dev)
>
> phydev = phy_connect(dev, phy_id_fmt, &altera_tse_adjust_link,
> priv->phy_iface);
> - if (IS_ERR(phydev))
> + if (IS_ERR(phydev)) {
> netdev_err(dev, "Could not attach to PHY\n");
> + phydev = NULL;
> + }
>
> } else {
> int ret;
>
Thanks for the patch!
Acked-by: Thor Thayer <thor.thayer@...ux.intel.com>
Powered by blists - more mailing lists