Re: [PATCH net v2] net: phy: Fix possible NULL pointer dereference issues caused by phy_attached_info_irq

From: Russell King (Oracle)
Date: Mon Jan 15 2024 - 06:28:47 EST


On Mon, Jan 15, 2024 at 04:50:18PM +0800, Kunwu Chan wrote:
> diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
> index ed0b4ccaa6a6..819574a06036 100644
> --- a/drivers/net/phy/phylink.c
> +++ b/drivers/net/phy/phylink.c
> @@ -1886,7 +1886,7 @@ static int phylink_bringup_phy(struct phylink *pl, struct phy_device *phy,
> irq_str = phy_attached_info_irq(phy);
> phylink_info(pl,
> "PHY [%s] driver [%s] (irq=%s)\n",
> - dev_name(&phy->mdio.dev), phy->drv->name, irq_str);
> + dev_name(&phy->mdio.dev), phy->drv->name, irq_str ? irq_str : "");


dev_name(&phy->mdio.dev), phy->drv->name,
irq_str ? irq_str : "");

please.

Also, please hold off posting v3 until at least 24 hours have passed.

Thanks.

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!