drm/logicvc: add missing of_node_put() in logicvc_layers_init()
Subsystems (3)
PATCH 1/1 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 <[email protected]>
Signed-off-by Yang Yingliang <[email protected]>
--- drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
drivers/gpu/drm/logicvc/logicvc_layer.c +4 -1
@@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc) } ret =logicvc_layer_init (logicvc, layer_node, index); -if (ret) +if (ret) { +of_node_put (layer_node); +of_node_put (layers_node); goto error; + }of_node_put (layer_node); }
Signature · 1 line
2.25.1
Hi Yang,
Quoted 5 lines · Yang Yingliang
The
of_node_put()need be called in error path inlogicvc_layers_init().Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>
Thanks for the fix!
Cheers,
Paul
Quoted 24 lines
--- drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/logicvc/logicvc_layer.c +4
-1@@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc) } ret =logicvc_layer_init (logicvc, layer_node, index); -if (ret) +if (ret) { +of_node_put (layer_node); +of_node_put (layers_node); goto error; + }of_node_put (layer_node); }Signature · 1 line
2.25.1
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Paul Kocialkowski
AppliedHi,
Quoted 5 lines · Paul Kocialkowski
Hi Yang,
Quoted 2 lines · Yang Yingliang
The
of_node_put()need be called in error path inlogicvc_layers_init().
Quoted 7 lines
Quoted 3 lines
Fixes efeeaefe9be5 ("drm: Add support for the LogiCVC display controller")Reported-by Hulk Robot <[email protected]>Signed-off-by Yang Yingliang <[email protected]>Thanks for the fix!
Adapted this after Julia's patch: Only the put on layers_node is required on error condition.
Pushed to drm-misc-next, thanks!
Paul
Quoted 29 lines
Quoted 24 lines
--- drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)drivers/gpu/drm/logicvc/logicvc_layer.c +4
-1@@ -610,8 +610,11 @@ int logicvc_layers_init(struct logicvc_drm *logicvc) } ret =logicvc_layer_init (logicvc, layer_node, index); -if (ret) +if (ret) { +of_node_put (layer_node); +of_node_put (layers_node); goto error; + }of_node_put (layer_node); }Signature · 1 line
2.25.1Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com
Signature · 3 lines
Paul Kocialkowski, Bootlin Embedded Linux and kernel engineering https://bootlin.com