| From | Selvamani Rajagopal <> | Subject | RE: [PATCH net-next v3 06/12] net: ethernet: oa_tc6: implement internal PHY initialization | Date | Thu, 21 Mar 2024 18:49:12 +0000 |
| |
> +static int oa_tc6_mdiobus_register(struct oa_tc6 *tc6) { > + int ret; > + > + tc6->mdiobus = mdiobus_alloc(); > + if (!tc6->mdiobus) { > + netdev_err(tc6->netdev, "MDIO bus alloc failed\n"); > + return -ENODEV; > + }
Shouldn't it be appropriate to return -ENOMEM here?
> + > + tc6->mdiobus->priv = tc6; > + tc6->mdiobus->read = oa_tc6_mdiobus_direct_read; > + tc6->mdiobus->write = oa_tc6_mdiobus_direct_write; > + tc6->mdiobus->name = "oa-tc6-mdiobus"; > + tc6->mdiobus->parent = tc6->dev; > +
|