]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/logicvc: add missing of_node_put() in logicvc_layers_init()
authorYang Yingliang <yangyingliang@huawei.com>
Tue, 14 Jun 2022 11:21:12 +0000 (19:21 +0800)
committerPaul Kocialkowski <paul.kocialkowski@bootlin.com>
Fri, 24 Jun 2022 15:23:38 +0000 (17:23 +0200)
The of_node_put() need be called in error path in logicvc_layers_init().

Fixes: 03b72aa1419a ("drm: Add support for the LogiCVC display controller")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220614112112.1537319-1-yangyingliang@huawei.com
drivers/gpu/drm/logicvc/logicvc_layer.c

index 31c5c42f0ac6ad3584a3bf0b5162e6e614890a2c..441e3cfce4cf9a07b4f9c664357a3313847577d1 100644 (file)
@@ -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);