From: Jakub Kicinski <kuba@kernel•org>
To: "Lucien.Jheng" <lucienzx159@gmail•com>
Cc: andrew@lunn•ch, hkallweit1@gmail•com, linux@armlinux•org.uk,
davem@davemloft•net, edumazet@google•com, pabeni@redhat•com,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org,
bjorn@mork•no, ericwouds@gmail•com, frank-w@public-files•de,
daniel@makrotopia•org, lucien.jheng@airoha•com,
albert-al.lee@airoha•com
Subject: Re: [PATCH v3] net: phy: air_en8811h: add AN8811HB MCU assert/deassert support
Date: Thu, 23 Apr 2026 10:21:02 -0700 [thread overview]
Message-ID: <20260423102102.0192b7de@kernel.org> (raw)
In-Reply-To: <20260420134506.35164-1-lucienzx159@gmail.com>
Since you need to repost to fix the fixes tag, plaese also improve the
error handling
On Mon, 20 Apr 2026 21:45:06 +0800 Lucien.Jheng wrote:
> static int an8811hb_probe(struct phy_device *phydev)
> {
> + struct mdio_device *mdiodev;
> struct en8811h_priv *priv;
> int ret;
>
> @@ -1175,10 +1281,22 @@ static int an8811hb_probe(struct phy_device *phydev)
> return -ENOMEM;
> phydev->priv = priv;
>
> + mdiodev = mdio_device_create(phydev->mdio.bus,
> + phydev->mdio.addr + EN8811H_PBUS_ADDR_OFFS);
> + if (IS_ERR(mdiodev))
> + return PTR_ERR(mdiodev);
> +
> + ret = mdio_device_register(mdiodev);
> + if (ret) {
goto err_dev_free;
> + mdio_device_free(mdiodev);
> + return ret;
> + }
> + priv->pbusdev = mdiodev;
> +
> ret = an8811hb_load_firmware(phydev);
> if (ret < 0) {
> phydev_err(phydev, "Load firmware failed: %d\n", ret);
> - return ret;
> + goto error;
goto err_dev_create;
> }
>
> en8811h_print_fw_version(phydev);
> @@ -1191,22 +1309,27 @@ static int an8811hb_probe(struct phy_device *phydev)
>
> ret = en8811h_leds_setup(phydev);
> if (ret < 0)
> - return ret;
> + goto error;
>
> priv->phydev = phydev;
> /* Co-Clock Output */
> ret = an8811hb_clk_provider_setup(&phydev->mdio.dev, &priv->hw);
> if (ret)
> - return ret;
> + goto error;
>
> /* Configure led gpio pins as output */
> ret = air_buckpbus_reg_modify(phydev, AN8811HB_GPIO_OUTPUT,
> AN8811HB_GPIO_OUTPUT_345,
> AN8811HB_GPIO_OUTPUT_345);
> if (ret < 0)
> - return ret;
> + goto error;
>
> return 0;
> +
> +error:
err_dev_free:
> + mdio_device_remove(priv->pbusdev);
err_dev_create:
> + mdio_device_free(priv->pbusdev);
> + return ret;
next prev parent reply other threads:[~2026-04-23 17:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-20 13:45 [PATCH v3] net: phy: air_en8811h: add AN8811HB MCU assert/deassert support Lucien.Jheng
2026-04-20 14:25 ` Bjørn Mork
2026-04-23 11:19 ` Paolo Abeni
2026-04-23 11:58 ` Andrew Lunn
2026-04-24 15:57 ` Lucien.Jheng
2026-04-24 15:56 ` Lucien.Jheng
2026-04-23 17:21 ` Jakub Kicinski [this message]
2026-04-24 15:59 ` Lucien.Jheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260423102102.0192b7de@kernel.org \
--to=kuba@kernel$(echo .)org \
--cc=albert-al.lee@airoha$(echo .)com \
--cc=andrew@lunn$(echo .)ch \
--cc=bjorn@mork$(echo .)no \
--cc=daniel@makrotopia$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=ericwouds@gmail$(echo .)com \
--cc=frank-w@public-files$(echo .)de \
--cc=hkallweit1@gmail$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux@armlinux$(echo .)org.uk \
--cc=lucien.jheng@airoha$(echo .)com \
--cc=lucienzx159@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox