[PATCH -next] drm/logicvc: add missing of_node_put() in logicvc_layers_init()

Paul Kocialkowski paul.kocialkowski at bootlin.com
Fri Jun 24 14:36:50 UTC 2022


Hi Yang,

On Tue 14 Jun 22, 19:21, Yang Yingliang wrote:
> 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 at huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang at huawei.com>

Thanks for the fix!

Acked-by: Paul Kocialkowski <paul.kocialkowski at bootlin.com>

Cheers,

Paul

> ---
>  drivers/gpu/drm/logicvc/logicvc_layer.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/logicvc/logicvc_layer.c b/drivers/gpu/drm/logicvc/logicvc_layer.c
> index bae1c7f99569..00a37563a6dc 100644
> --- a/drivers/gpu/drm/logicvc/logicvc_layer.c
> +++ b/drivers/gpu/drm/logicvc/logicvc_layer.c
> @@ -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);
>  	}
> -- 
> 2.25.1
> 

-- 
Paul Kocialkowski, Bootlin
Embedded Linux and kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20220624/0b73a68d/attachment.sig>


More information about the dri-devel mailing list