[U-Boot] [PATCH] common: miiphyutil: no need to check name of mii_dev

Bin Meng bmeng.cn at gmail.com
Wed Nov 25 02:52:48 CET 2015


On Tue, Nov 24, 2015 at 5:03 PM, Peng Fan <Peng.Fan at freescale.com> wrote:
> The entry name of mii_dev is an array not pointer, so
> no need to check.
>
> Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
> Cc: Joe Hershberger <joe.hershberger at ni.com>
> Cc: Simon Glass <sjg at chromium.org>
> Cc: Bin Meng <bmeng.cn at gmail.com>
> ---
>  common/miiphyutil.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/miiphyutil.c b/common/miiphyutil.c
> index e499b58..0811e09 100644
> --- a/common/miiphyutil.c
> +++ b/common/miiphyutil.c
> @@ -159,7 +159,7 @@ void mdio_free(struct mii_dev *bus)
>
>  int mdio_register(struct mii_dev *bus)
>  {
> -       if (!bus || !bus->name || !bus->read || !bus->write)
> +       if (!bus || !bus->read || !bus->write)
>                 return -1;
>
>         /* check if we have unique name */
> --

Reviewed-by: Bin Meng <bmeng.cn at gmail.com>


More information about the U-Boot mailing list