RE: [PATCH net-next v3 06/12] net: ethernet: oa_tc6: implement internal PHY initialization

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> +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;
> +





[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux