From mboxrd@z Thu Jan 1 00:00:00 1970 From: zhong jiang Subject: Re: [PATCH] gpu: do not double put device node in zx_drm_probe Date: Thu, 6 Sep 2018 22:51:30 +0800 Message-ID: <5B913EF2.1010209@huawei.com> References: <1534472646-10368-1-git-send-email-zhongjiang@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1534472646-10368-1-git-send-email-zhongjiang@huawei.com> Sender: linux-kernel-owner@vger.kernel.org To: shawnguo@kernel.org, airlied@linux.ie, noralf@tronnes.org, daniel.vetter@intel.com Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org List-Id: dri-devel@lists.freedesktop.org +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 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); > }