[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b7dd860e-12f9-551d-a712-16dc75213acc@amd.com>
Date: Thu, 17 Aug 2023 13:39:25 +0530
From: Shyam Sundar S K <Shyam-sundar.S-k@....com>
To: Ruan Jinjie <ruanjinjie@...wei.com>, davem@...emloft.net,
edumazet@...gle.com, kuba@...nel.org, pabeni@...hat.com,
yisen.zhuang@...wei.com, salil.mehta@...wei.com,
iyappan@...amperecomputing.com, keyur@...amperecomputing.com,
quan@...amperecomputing.com, andrew@...n.ch, hkallweit1@...il.com,
linux@...linux.org.uk, yankejian@...wei.com, netdev@...r.kernel.org,
"Rangoju, Raju" <Raju.Rangoju@....com>
Subject: Re: [PATCH net-next 2/3] amd-xgbe: Return proper error code for
get_phy_device()
On 8/17/2023 1:09 PM, Ruan Jinjie wrote:
> get_phy_device() returns -EIO on bus access error and -ENOMEM
> on kzalloc failure in addition to -ENODEV, just return -ENODEV is not
> sensible, use PTR_ERR(phydev) to fix the issue.
>
> Signed-off-by: Ruan Jinjie <ruanjinjie@...wei.com>
Looks good to me.
Acked-by: Shyam Sundar S K <Shyam-sundar.S-k@....com>
Thanks,
Shyam
> ---
> drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> index 6a716337f48b..2f0a014ffc72 100644
> --- a/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> +++ b/drivers/net/ethernet/amd/xgbe/xgbe-phy-v2.c
> @@ -1090,7 +1090,7 @@ static int xgbe_phy_find_phy_device(struct xgbe_prv_data *pdata)
> (phy_data->phydev_mode == XGBE_MDIO_MODE_CL45));
> if (IS_ERR(phydev)) {
> netdev_err(pdata->netdev, "get_phy_device failed\n");
> - return -ENODEV;
> + return PTR_ERR(phydev);
> }
> netif_dbg(pdata, drv, pdata->netdev, "external PHY id is %#010x\n",
> phydev->phy_id);
>
Powered by blists - more mailing lists