[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240911192425.428db5ac@fedora.home>
Date: Wed, 11 Sep 2024 19:24:25 +0200
From: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Raju Lakkaraju <Raju.Lakkaraju@...rochip.com>
Cc: <netdev@...r.kernel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
<kuba@...nel.org>, <pabeni@...hat.com>, <bryan.whitehead@...rochip.com>,
<UNGLinuxDriver@...rochip.com>, <linux@...linux.org.uk>,
<rdunlap@...radead.org>, <andrew@...n.ch>, <Steen.Hegelund@...rochip.com>,
<daniel.machon@...rochip.com>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next V2 4/5] net: lan743x: Implement phylink pcs
Hello Raju,
On Wed, 11 Sep 2024 21:40:53 +0530
Raju Lakkaraju <Raju.Lakkaraju@...rochip.com> wrote:
[...]
> @@ -3820,9 +3869,28 @@ static int lan743x_mdiobus_init(struct lan743x_adapter *adapter)
> ret = mdiobus_register(adapter->mdiobus);
> if (ret < 0)
> goto return_error;
> +
> + if (adapter->is_sfp_support_en) {
> + if (!adapter->phy_interface)
> + lan743x_phy_interface_select(adapter);
> +
> + xpcs = xpcs_create_mdiodev(adapter->mdiobus, 0,
> + adapter->phy_interface);
> + if (IS_ERR(xpcs)) {
> + netdev_err(adapter->netdev, "failed to create xpcs\n");
> + ret = PTR_ERR(xpcs);
> + goto err_destroy_xpcs;
> + }
> + adapter->xpcs = xpcs;
> + }
> +
> return 0;
>
> +err_destroy_xpcs:
> + xpcs_destroy(xpcs);
It looks like here, you're destroying the xpcs only when the xpcs
couln't be created in the first place, so no need to destroy it :)
Best regards,
Maxime
Powered by blists - more mailing lists