On Thu, Feb 18, 2021 at 7:29 AM Calvin Johnson
<calvin.john...@oss.nxp.com> wrote:
>
> Modify dpaa2_mac_get_node() to get the dpmac fwnode from either
> DT or ACPI.
>
> Modify dpaa2_mac_get_if_mode() to get interface mode from dpmac_node
> which is a fwnode.
>
> Modify dpaa2_pcs_create() to create pcs from dpmac_node fwnode.
>
> Modify dpaa2_mac_connect() to support ACPI along with DT.

...

> +                       if (is_of_node(fwnode))

Redundant check I think. If it's not an fwnode, the dpmacs is NULL and
of_node_put() is NULL-aware.

> +                               of_node_put(dpmacs);

...

> +       if (is_of_node(fwnode))
> +               of_node_put(dpmacs);

Ditto.

...

>         mac->if_link_type = mac->attr.link_type;
> -

Do we need to remove this blank line?

...

> +       if (is_of_node(dpmac_node))
> +               fwnode_handle_put(dpmac_node);

> +       if (is_of_node(dpmac_node))
> +               fwnode_handle_put(dpmac_node);

Also not sure that you need a check in the above code excerpts.

-- 
With Best Regards,
Andy Shevchenko

Reply via email to