Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp1971337img; Sat, 23 Mar 2019 18:23:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqxuxlQEWGOtlpSvI3iZeXCKyFTnONk3ik0/d84wI4tf45WIcyAjJeQmeODgQyhzOf3sh0lL X-Received: by 2002:a63:5d04:: with SMTP id r4mr6789856pgb.117.1553390611630; Sat, 23 Mar 2019 18:23:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1553390611; cv=none; d=google.com; s=arc-20160816; b=M5uMgsA4dNC9ALwo8aAOEmARE1Us9zC4K62iodj5pZf2njLXcetw55YZiR8Mel8kep UDLXnCrTtd/ilfxCeDRy7ITheIY2tkilhY7uAHNWly3nc/WAbhNkd1KkpG72YL8P40Gl Z4WdKtusEm7EMcgd+FvRAZoot6oxJmWYzz1rn2hcfEzWhnVEUX4ImHAJrnPtCLEsK+en FuHWP1hmtR/IsQmTPSbm1bzJWaZFCecPIYlxIesYKGL+DC13OxI+bw1AG/pzCjOa4+tw 6tTSCRZMELCptF+2s3p6Q5KFsLo9Qrvf7cvtibAz275kIlsVi/8o8iWjkfR2MwdUcuLj cm/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=R/3hG6YKshzNJlHXY5FHxZhyYGHKarDGzwBmReTXXhQ=; b=x17EmxPMRoYcibbCMc0vJztftkhFNL/1OBlg8ztiAdp3S7Fc0FpRU3acaES78KmGj2 cq6A/faIQVYkFZ2/L4lgOCzzuZgZGf0s90uIVsABapxaDrdwdF/b2g85ciryShj0kQ9D g0JZE3Dpa73JcgPo45WUo9zgvDh4sdxV7vL0fOjm1WlUscmliYTZ0ItKJFLQjA1T37xh DMPu3pNRA1n3LVQuCX88UzBJsz1vvxKDDQmThOuw3U/xe5zPYhDM9ZiYo0WpwGaJGPM0 SMG5gCApVW+t4kQsRBFYZzJ3QyAR6O0C0PQwAKIdAEv9bMKRGz0ezPL+g7ES6GnE3OWJ e2pw== 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 f7si6012957pgg.234.2019.03.23.18.23.16; Sat, 23 Mar 2019 18:23:31 -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 S1728199AbfCXBWD (ORCPT + 99 others); Sat, 23 Mar 2019 21:22:03 -0400 Received: from shards.monkeyblade.net ([23.128.96.9]:35112 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727635AbfCXBWD (ORCPT ); Sat, 23 Mar 2019 21:22:03 -0400 Received: from localhost (unknown [50.233.106.125]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id 1469B14B479B4; Sat, 23 Mar 2019 18:22:03 -0700 (PDT) Date: Sat, 23 Mar 2019 21:22:02 -0400 (EDT) Message-Id: <20190323.212202.1802065146621678109.davem@davemloft.net> To: wen.yang99@zte.com.cn Cc: linux-kernel@vger.kernel.org, wang.yi59@zte.com.cn, w-kwok2@ti.com, m-karicheri2@ti.com, netdev@vger.kernel.org Subject: Re: [PATCH 3/3] net: ethernet: ti: fix possible object reference leak From: David Miller In-Reply-To: <1553223849-7143-3-git-send-email-wen.yang99@zte.com.cn> References: <1553223849-7143-1-git-send-email-wen.yang99@zte.com.cn> <1553223849-7143-3-git-send-email-wen.yang99@zte.com.cn> X-Mailer: Mew version 6.8 on Emacs 26.1 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Sat, 23 Mar 2019 18:22:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wen Yang Date: Fri, 22 Mar 2019 11:04:09 +0800 > The call to of_get_child_by_name returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./drivers/net/ethernet/ti/netcp_ethss.c:3661:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3654, but without a corresponding object release within this function. > ./drivers/net/ethernet/ti/netcp_ethss.c:3665:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 3654, but without a corresponding object release within this function. > > Signed-off-by: Wen Yang Applied.