lkml.org 
[lkml]   [2022]   [Sep]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next v7 4/7] net: mdiobus: search for PSE nodes by parsing PHY nodes.
On Mon, 26 Sep 2022 13:24:57 +0200 Oleksij Rempel wrote:
> +static struct pse_control *
> +fwnode_find_pse_control(struct fwnode_handle *fwnode)
> +{
> + struct pse_control *psec;
> + struct device_node *np;
> +
> + np = to_of_node(fwnode);
> + if (!np)
> + return NULL;
> +
> + psec = of_pse_control_get(np);

This will fail with ENOTSUPP if PSE is not built. Won't that make all
fwnode_mdiobus_register_phy() calls fail?

static inline struct pse_control *of_pse_control_get(struct device_node *node)
{
return ERR_PTR(-ENOTSUPP);
}

Actually let me take a closer look at patch 2 :S

> + if (PTR_ERR(psec) == -ENOENT)
> + return NULL;
> +
> + return psec;
> +}

\
 
 \ /
  Last update: 2022-09-28 02:56    [W:0.309 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site