From e9fcc60ddd29994a8b2a276ee9b454d7cd449194 Mon Sep 17 00:00:00 2001 From: Yang Yingliang Date: Tue, 14 Jun 2022 19:21:12 +0800 Subject: drm/logicvc: add missing of_node_put() in logicvc_layers_init() The of_node_put() need be called in error path in logicvc_layers_init(). Fixes: efeeaefe9be5 ("drm: Add support for the LogiCVC display controller") Reported-by: Hulk Robot Signed-off-by: Yang Yingliang Signed-off-by: Paul Kocialkowski Link: https://patchwork.freedesktop.org/patch/msgid/20220614112112.1537319-1-yangyingliang@huawei.com --- drivers/gpu/drm/logicvc/logicvc_layer.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c index 31c5c42f0ac6..441e3cfce4cf 100644 --- a/drivers/gpu/drm/logicvc/logicvc_layer.c +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c @@ -613,8 +613,10 @@ int logicvc_layers_init(struct logicvc_drm *logicvc) } ret = logicvc_layer_init(logicvc, layer_node, index); - if (ret) + if (ret) { + of_node_put(layers_node); goto error; + } } of_node_put(layers_node); -- cgit v1.2.3