lkml.org 
[lkml]   [2018]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] gpu: do not double put device node in zx_drm_probe
+to maintainer.
On 2018/8/17 10:24, zhong jiang wrote:
> for_each_available_child_of_node will get and put the node properly,
> the following of_node_put will lead to the double put. So just
> remove it.
>
> Signed-off-by: zhong jiang <zhongjiang@huawei.com>gg
> ---
> drivers/gpu/drm/zte/zx_drm_drv.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/zte/zx_drm_drv.c b/drivers/gpu/drm/zte/zx_drm_drv.c
> index 6f4205e8..d7b9870 100644
> --- a/drivers/gpu/drm/zte/zx_drm_drv.c
> +++ b/drivers/gpu/drm/zte/zx_drm_drv.c
> @@ -161,10 +161,8 @@ static int zx_drm_probe(struct platform_device *pdev)
> if (ret)
> return ret;
>
> - for_each_available_child_of_node(parent, child) {
> + for_each_available_child_of_node(parent, child)
> component_match_add(dev, &match, compare_of, child);
> - of_node_put(child);
> - }
>
> return component_master_add_with_match(dev, &zx_drm_master_ops, match);
> }


\
 
 \ /
  Last update: 2018-09-06 16:52    [W:0.223 / U:0.112 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site