Skip to contentSkip to conversation

drm/sprd: Remove of_node_put() in sprd_crtc_init()

PATCH In review Liang He 2 participants 2 messages Jul 7, 2022 – Jul 8, 2022

Subsystems (3)
lore
Share & tools
lore

Liang He

author
#0 lore raw

PATCH 1/1 drm/sprd: Remove of_node_put() in sprd_crtc_init()

As the new reference created in 'dpu->base.port' will be escaped out, we need not to call of_node_put() again.

Fixes b07bcf34b6c9 ("drm/sprd: add Unisoc's drm display controller driver")
---
 drivers/gpu/drm/sprd/sprd_dpu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/sprd/sprd_dpu.c +0 -1
index 1637203ea103..e1b70f989da5 100644
@@ -741,7 +741,6 @@ static struct sprd_dpu *sprd_crtc_init(struct drm_device *drm,
 		return ERR_PTR(-EINVAL);
 	}
 	dpu->base.port = port;
-	of_node_put(port);
 
 	return dpu;
 }
Signature · 1 line
2.25.1
reviewer
#1 lore raw

+ Kevin

Quoted 25 lines · Liang He

As the new reference created in 'dpu->base.port' will be escaped out, we need not to call of_node_put() again.

Fixes b07bcf34b6c9 ("drm/sprd: add Unisoc's drm display controller driver")
---
 drivers/gpu/drm/sprd/sprd_dpu.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/sprd/sprd_dpu.c +0 -2
index 1637203ea103..e1b70f989da5 100644
@@ -741,7 +741,6 @@ static struct sprd_dpu *sprd_crtc_init(struct drm_device *drm,
                return ERR_PTR(-EINVAL);
        }
        dpu->base.port = port;
-       of_node_put(port);
 
        return dpu;
 }
--

2.25.1