Re: [PATCH v4 2/3] phy: handle optional regulator for PHY

From: Andrew Lunn
Date: Tue Nov 15 2022 - 20:59:03 EST


> + reg_cnt = of_regulator_bulk_get_all(&bus->dev, nchild, &consumers);

This allocates memory for consumers?

I don't see it being freed. I think you need to add to
phy_remove. Plus the error patch should also free it.

Andrew