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]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux