drm: logicvc: Add missing of_node_put() in logicvc_drm_config_parse()
Subsystems (3)
PATCH 1/1 drm: logicvc: Add missing of_node_put() in logicvc_drm_config_parse()
of_get_child_by_name() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
Signed-off-by Peng Wu <[email protected]>
Reported-by Hulk Robot <[email protected]>
--- drivers/gpu/drm/logicvc/logicvc_drm.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/logicvc/logicvc_drm.c +2 -0
@@ -136,8 +136,10 @@ static int logicvc_drm_config_parse(struct logicvc_drm *logicvc)if (!config->layers_count) {drm_err (drm_dev,"Missing a non-optional layers children node\n" ); +of_node_put (layers_node);return -EINVAL ; } +of_node_put (layers_node);return 0 ; }
Signature · 1 line
2.17.1