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

Russell King (Oracle) linux at armlinux.org.uk
Tue Jan 2 03:38:59 PST 2024


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!



More information about the linux-arm-kernel mailing list