Re: [PATCH net-next 3/3] net: mdio: improve reset handling in mdio_device.c

From: Jakub Kicinski

Date: Thu Nov 06 2025 - 17:46:04 EST


On Fri, 31 Oct 2025 12:32:28 +0100 Buday Csaba wrote:
> reset = reset_control_get_optional_exclusive(&mdiodev->dev, "phy");
> - if (IS_ERR(reset))
> + if (IS_ERR(reset)) {
> + gpiod_put(mdiodev->reset_gpio);
> + mdiodev->reset_gpio = NULL;
> return PTR_ERR(reset);
> + }

We usually consider all sort of leaks as real fixes.
Let's fix this in mdiobus_register_device() in net/main first?
Then do the refactoring once net merges into net-next (every Thu)?
--
pw-bot: cr