Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp243619imm; Thu, 16 Aug 2018 19:37:29 -0700 (PDT) X-Google-Smtp-Source: AA+uWPx4yb+BVJk3fI1lV6M1fiYrhH4Lc4lucfiKcUAW/y2MqHUEV665AZjlSlIaNvJbMdzuXBn5 X-Received: by 2002:a63:1f20:: with SMTP id f32-v6mr30298147pgf.84.1534473449517; Thu, 16 Aug 2018 19:37:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534473449; cv=none; d=google.com; s=arc-20160816; b=gIIvCsWhhOJraaf5nXR00o84NMxP+ThG9z4quaa1XAFImuA7zdi0Z3eEzhX/EGiCSL JCa04l4DqEASq7fmXwyNkRmm3yxtQRRhDinrVV+PMdaRUGTCJBPEHt/3272Qqm2JdcWP LFbXwSOlg9fMs0KaNRCLFUk3Nwx076dtwW8K1CAufUdznEWykyTUHAIC/yye1ut8GiIy fOmcAnP5ZJmjkPXO51+LHcJg4PSpZHPHllrY4FpJ8OlbvhQ2s6aD58VJrIOeg+z7vq0y 3byi8+G+cUJgS2Wu64LFKRKuXxLw8XQtiyvDD7Z5FWpa3ZIBfRP3pTXUpQDUajOkQxi5 QakA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=NhJVK2yNvRDiOPuhGrcdPU1X3uoHQHD6dqDqvadWIu0=; b=Hhb4GtSFNdXA5lz7b5B5Pl5/kUkgGTRWf5HvkTKTlaU/P9Oju1Boc0bOZGmTC42nTb xOuhujwbeyiVIrxdi9bTzJL+r0Uwur3zS+7nQYapBw1pZGw409G4vIslykgHPsarc9L7 QwE5XX+CuYPPhMC661YFq1xXZs6P98UDAx29aY22Ieix+L2i6qq14AzbJ+EYVdyT1e7m piTK6R9h7PFrJ4d7us+dFse0gUN+V8User8fiJMoC1tt7pYOUpFHX5s3NYpTdp/iy8Gn oObV1KJJL6PaFppYcL1b1y7StKNfPgHOyPUa38nGlyueyQKmBsOvO9E4nvFYoN3Q1jwZ kuLQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h7-v6si868477pgl.399.2018.08.16.19.37.13; Thu, 16 Aug 2018 19:37:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726281AbeHQFhc (ORCPT + 99 others); Fri, 17 Aug 2018 01:37:32 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:11125 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725833AbeHQFhc (ORCPT ); Fri, 17 Aug 2018 01:37:32 -0400 Received: from DGGEMS406-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 06D796F6248E3; Fri, 17 Aug 2018 10:35:58 +0800 (CST) Received: from linux-ibm.site (10.175.102.37) by DGGEMS406-HUB.china.huawei.com (10.3.19.206) with Microsoft SMTP Server id 14.3.399.0; Fri, 17 Aug 2018 10:35:56 +0800 From: zhong jiang To: , CC: , Subject: [PATCH] gpu: do not double put device node in zx_drm_probe Date: Fri, 17 Aug 2018 10:24:06 +0800 Message-ID: <1534472646-10368-1-git-send-email-zhongjiang@huawei.com> X-Mailer: git-send-email 1.7.12.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.102.37] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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); } -- 1.7.12.4