Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <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

authored by

Yang Yingliang and committed by
Paul Kocialkowski
e9fcc60d d3a45341

+3 -1
+3 -1
drivers/gpu/drm/logicvc/logicvc_layer.c
··· 613 613 } 614 614 615 615 ret = logicvc_layer_init(logicvc, layer_node, index); 616 - if (ret) 616 + if (ret) { 617 + of_node_put(layers_node); 617 618 goto error; 619 + } 618 620 } 619 621 620 622 of_node_put(layers_node);