Re: [PATCH net-next v3 06/12] net: ethernet: oa_tc6: implement internal PHY initialization
From: Parthiban.Veerasooran
Date: Fri Mar 22 2024 - 01:52:41 EST
On 22/03/24 12:19 am, Selvamani Rajagopal wrote:
> [Some people who received this message don't often get email from selvamani.rajagopal@xxxxxxxxxx. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
>> +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?
Yes, will change it in the next version.
Best regards,
Parthiban V
>
>> +
>> + 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;
>> +
>