[U-Boot] [PATCH 1/3] net: phy: Don't create phy device when there is no phy

Bin Meng bmeng.cn at gmail.com
Wed Sep 9 02:48:39 CEST 2015


Hi Joe,

On Fri, Sep 4, 2015 at 7:56 PM, Bin Meng <bmeng.cn at gmail.com> wrote:
> In get_phy_device_by_mask(), when no phy is found, we should not
> create any phy device.
>
> Signed-off-by: Bin Meng <bmeng.cn at gmail.com>
> ---
>
>  drivers/net/phy/phy.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
> index 65c731a..0d66e75 100644
> --- a/drivers/net/phy/phy.c
> +++ b/drivers/net/phy/phy.c
> @@ -672,7 +672,8 @@ static struct phy_device *get_phy_device_by_mask(struct mii_dev *bus,
>                         return phydev;
>         }
>         printf("Phy %d not found\n", ffs(phy_mask) - 1);
> -       return phy_device_create(bus, ffs(phy_mask) - 1, 0xffffffff, interface);
> +
> +       return NULL;
>  }
>
>  /**
> --

Ping?

Regards,
Bin


More information about the U-Boot mailing list