Messages in this thread | | | Date | Tue, 27 Sep 2022 17:55:48 -0700 | From | Jakub Kicinski <> | Subject | Re: [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; > +}
| |