[PATCH 10/42] drm: pl111: Use devm_of_reserved_mem_device_init()
Mukesh Ojha
mukesh.ojha at oss.qualcomm.com
Fri Jul 3 12:38:23 PDT 2026
Switch to devm_of_reserved_mem_device_init() so the reserved memory
region is released automatically on probe failure or device removal.
Remove the explicit of_reserved_mem_device_release() calls in the
dev_put error path and pl111_amba_remove().
Signed-off-by: Mukesh Ojha <mukesh.ojha at oss.qualcomm.com>
---
drivers/gpu/drm/pl111/pl111_drv.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c
index ac7b1d12a0f5..25ce37a4e8bf 100644
--- a/drivers/gpu/drm/pl111/pl111_drv.c
+++ b/drivers/gpu/drm/pl111/pl111_drv.c
@@ -254,7 +254,7 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
drm->dev_private = priv;
priv->variant = variant;
- ret = of_reserved_mem_device_init(dev);
+ ret = devm_of_reserved_mem_device_init(dev);
if (!ret) {
drm_info(drm, "using device-specific reserved memory\n");
priv->use_device_memory = true;
@@ -313,7 +313,6 @@ static int pl111_amba_probe(struct amba_device *amba_dev,
dev_put:
drm_dev_put(drm);
- of_reserved_mem_device_release(dev);
return ret;
}
@@ -329,7 +328,6 @@ static void pl111_amba_remove(struct amba_device *amba_dev)
if (priv->panel)
drm_panel_bridge_remove(priv->bridge);
drm_dev_put(drm);
- of_reserved_mem_device_release(dev);
}
static void pl111_amba_shutdown(struct amba_device *amba_dev)
--
2.53.0
More information about the Linux-mediatek
mailing list