Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2868697yba; Mon, 15 Apr 2019 22:57:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqynwx9fZCJ75X8ohBokkn/lR/mtRcZ/wmgbAcJy5z/kf3H4RYFGra9LdPL4zO0h6MC73IxK X-Received: by 2002:aa7:8494:: with SMTP id u20mr52750289pfn.76.1555394257372; Mon, 15 Apr 2019 22:57:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555394257; cv=none; d=google.com; s=arc-20160816; b=MKhuB/GWcAT8P2o7UDWTaInrBI5OMfj4sHyiXWpdHAMClkBSGIDp6n62gWRdLLdIBs Xirr7ocYDVps/s6mnONN0MK56SPOrme6LpZAxphJxkeEIghSLdwgA89kiFCNjfbT/i2i CgLtYQ78uCbes9GT3LEImSq30WXpiOOOsP3pULgfzfSoTZrj2DP5GRNTitRrvE+t12v6 lO0GC8B5lMDpy5ViJwrMPcUh5Ki14lkbi0rx9RE/RbDtRdEDXZpBeJZHZ6x5UL0rbck2 uNYN6SVEowX1t7gBpNJR4bj+ABXg3FxEea0cUtK2hnpJ/JTfMvZdinE626fBaAOeUrHa 4fIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=MfTzQ7BB+rBgOGyG8qFuDvGfbxMJ5P3TC940CE3+lhk=; b=FsL+jBx7NSqsh55kbRZIj5thkl8jIp0KPBBuA8vFgwD4NdWdcCPXvpMwAwr7dLJ7mz hEBj2tGSds9vgA88eNP7McrRAva4iPBpgXKzQ281DD725dKR96OjWzFNL3lOH6TEjkI+ mmd3trDlqZnpE/hSKRdO2g4zxim/TmGevhn8Wj0EGBMF83/erlXnQCzjOen0rzCghPFt SF8Xpb/68R0Q2wsG/mPokM91I0Mr8aXCf1lGmunJz1Wu7IpyQfdWY7wastqI34Pq7HNt RI8dje2tVDVGCySlcBjgaqXGKeIyEGSKVPsCNK2NypWEOnVZtqsD/ZfQlVRFp0snraxO L4Yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=dXIq5AeZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g12si18731368pla.112.2019.04.15.22.57.21; Mon, 15 Apr 2019 22:57:37 -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; dkim=pass header.i=@kernel.org header.s=default header.b=dXIq5AeZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727437AbfDPF4R (ORCPT + 99 others); Tue, 16 Apr 2019 01:56:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:50970 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727326AbfDPF4Q (ORCPT ); Tue, 16 Apr 2019 01:56:16 -0400 Received: from X250.skyworth_vap (98.142.130.235.16clouds.com [98.142.130.235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 14BFD2075B; Tue, 16 Apr 2019 05:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1555394176; bh=LaZg30p3LT3/qmY6KjsGymjyxExVucxjEZ/L30zMURw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=dXIq5AeZwRgLocf08Xq7PzDtwakUT31ato9l289AbDVTezmQuAEPMLa2upSmMxh4d D6j7qxrlFOezCULNR++eZzNoP9wAhs6Is8xvd+KprLl/xVjoutrm0fknhiReiQLZyC gZKCWgOnfH2SW4LIxC64VGV3IKtZJbfvy2yHx+ec= Date: Tue, 16 Apr 2019 13:56:09 +0800 From: Shawn Guo To: Wen Yang Cc: linux-kernel@vger.kernel.org, wang.yi59@zte.com.cn, Linus Walleij , Jun Nie , linux-gpio@vger.kernel.org Subject: Re: [PATCH 5/5] pinctrl: zte: fix leaked of_node references Message-ID: <20190416055601.GB4690@X250.skyworth_vap> References: <1555048943-39589-1-git-send-email-wen.yang99@zte.com.cn> <1555048943-39589-6-git-send-email-wen.yang99@zte.com.cn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1555048943-39589-6-git-send-email-wen.yang99@zte.com.cn> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Apr 12, 2019 at 02:02:23PM +0800, Wen Yang wrote: > The call to of_parse_phandle 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/pinctrl/zte/pinctrl-zx.c:415:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:422:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:436:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:444:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > ./drivers/pinctrl/zte/pinctrl-zx.c:448:1-7: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 407, but without a corresponding object release within this function. > > Signed-off-by: Wen Yang > Cc: Linus Walleij > Cc: Jun Nie > Cc: Shawn Guo Acked-by: Shawn Guo