Re: [PATCH v5 1/3] phy: handle optional regulator for PHY

From: Russell King (Oracle)
Date: Tue Jan 02 2024 - 06:39:21 EST


On Thu, Dec 21, 2023 at 10:06:50AM +0100, Andrew Lunn wrote:
> I've not used regulators much, but i think you can combine these two
> into one. Its guaranteed *consumer is NULL if reg_cnt == 0. And
> kfree() is happy with a NULL pointer.

kfree(NULL) is valid (and is a no-op.)

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