[PATCH] phy: uniphier-usb3: no devm for nvmem_cell_get

From: Rosen Penev

Date: Tue Mar 03 2026 - 23:16:31 EST


There is absolutely no reason to extend the lifetime of nvmem_cell_get
to after removal of the driver. Use and free right after use.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
drivers/phy/socionext/phy-uniphier-usb3hs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/phy/socionext/phy-uniphier-usb3hs.c b/drivers/phy/socionext/phy-uniphier-usb3hs.c
index 8c8673df0084..c8971eee3640 100644
--- a/drivers/phy/socionext/phy-uniphier-usb3hs.c
+++ b/drivers/phy/socionext/phy-uniphier-usb3hs.c
@@ -104,11 +104,12 @@ static int uniphier_u3hsphy_get_nvparam(struct uniphier_u3hsphy_priv *priv,
struct nvmem_cell *cell;
u8 *buf;

- cell = devm_nvmem_cell_get(priv->dev, name);
+ cell = nvmem_cell_get(priv->dev, name);
if (IS_ERR(cell))
return PTR_ERR(cell);

buf = nvmem_cell_read(cell, NULL);
+ nvmem_cell_put(cell);
if (IS_ERR(buf))
return PTR_ERR(buf);

--
2.53.0