Re: [PATCH 3/7] net: lan966x: Convert to devm_of_phy_optional_get()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Geert,

This looks good to me.

BR
Steen

Reviewed-by: Steen Hegelund <Steen.Hegelund@xxxxxxxxxxxxx>

On Wed, 2023-01-18 at 11:15 +0100, Geert Uytterhoeven wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
> 
> Use the new devm_of_phy_optional_get() helper instead of open-coding the
> same operation.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
> ---
>  drivers/net/ethernet/microchip/lan966x/lan966x_main.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> index cadde20505ba0689..d64a525cdc9ea18b 100644
> --- a/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> +++ b/drivers/net/ethernet/microchip/lan966x/lan966x_main.c
> @@ -1147,9 +1147,8 @@ static int lan966x_probe(struct platform_device *pdev)
>                 lan966x->ports[p]->config.portmode = phy_mode;
>                 lan966x->ports[p]->fwnode = fwnode_handle_get(portnp);
> 
> -               serdes = devm_of_phy_get(lan966x->dev, to_of_node(portnp),
> NULL);
> -               if (PTR_ERR(serdes) == -ENODEV)
> -                       serdes = NULL;
> +               serdes = devm_of_phy_optional_get(lan966x->dev,
> +                                                 to_of_node(portnp), NULL);
>                 if (IS_ERR(serdes)) {
>                         err = PTR_ERR(serdes);
>                         goto cleanup_ports;
> --
> 2.34.1
> 





[Index of Archives]     [Linux SoC Development]     [Linux Rockchip Development]     [Linux for Synopsys ARC Processors]    
  • [Linux on Unisoc (RDA Micro) SoCs]     [Linux Actions SoC]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Linux SCSI]     [Yosemite News]

  •   Powered by Linux