Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3346271yba; Tue, 23 Apr 2019 02:05:02 -0700 (PDT) X-Google-Smtp-Source: APXvYqxm75Jh9I33IvvEJv1ts4iL0FAt8O0Kc+KQJ2s4O+BxsQo5ZfC1GsL5UBbRae0Smlp5BmbG X-Received: by 2002:a62:204b:: with SMTP id g72mr24756710pfg.51.1556010301927; Tue, 23 Apr 2019 02:05:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556010301; cv=none; d=google.com; s=arc-20160816; b=qmiyUmNId8U70jSC8xSLHsFLMWj7ErOYfB0gcOBfGvNsbqVKDYQSRxjsdoNxZpVk/Z Hmhmnj9rCv52uQrd/KtnAtyiA0u/46e7isoDEV6BZ7GL8mbfzUcfBOuLQa8sRRSIhXPc vpRJsShadLaVrgRQ/KY++GijNeudQyC43uGPu7QLlfGL7yDJ4avzHnfjjyizAiWjf4gq 2WvnBf3IZ4h220dYHqE1Au7EtDaJlbk+bHYgSRXQrwkJgnyDhVnMNQd1QKlvM7RV8wfE 1MowJ2DWNFKO+PxS9XNrE3ot8r0NzV0G933ePK8SumKUoiO5zmYr4TS273ltlutyBTMZ bO4A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=U9N7UGhQON+gI/ng6qZFxfvVySNzQpvfR8FPw13NHic=; b=HVbU8LewjNcWRUmQCOapusJb49Pla8nUZbEkx9Xj2bSss2qDiU3pOqwz0/Xs5nupXy y6z69gxeJ5Ct6twZcfLwUOMGKho5eyBLGv8YlayGRUeYqMZg4+FyeCbrKiVpOI5+dZIU vtjrhfF/h/u7nAqTfiqNHs5nqQgCScT2ZMRdprMXGBlXZcR8cqIO7Fd4L1qwrh5ijfR/ J1RfDsxC4wsPbVNbHXZ/NDHltYMBj4BW19gBia4W9N3r5NM76R+UAcSYXO+dff1/plYD +UgE4XwJ5FnwHB8qKj8m+oDE383P/X9QcLoeUU/mAAfySrxw/TLGu1B2dFdy1X8tYJRY dXVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=r7sE7Sz1; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a23si4740835pgw.142.2019.04.23.02.04.46; Tue, 23 Apr 2019 02:05:01 -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=@linaro.org header.s=google header.b=r7sE7Sz1; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726803AbfDWJCR (ORCPT + 99 others); Tue, 23 Apr 2019 05:02:17 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40178 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725939AbfDWJCR (ORCPT ); Tue, 23 Apr 2019 05:02:17 -0400 Received: by mail-lj1-f195.google.com with SMTP id q66so12764770ljq.7 for ; Tue, 23 Apr 2019 02:02:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=U9N7UGhQON+gI/ng6qZFxfvVySNzQpvfR8FPw13NHic=; b=r7sE7Sz1rL6BxTyln/k6U8+Iyv05Of1hQeD2psM1A/HRVlJLhfuv66Ag33tOrLEebT Z896v/cQCby49422KYIqJExzffv5des+dthVJLhxOP6s6Li3DGgB2svSzvhhmrSWkduc oY3POUUkjkl1wtuN6zLBgt40lgKZe9dit5XeCznjDHm8GwXdbzCGDNsDCQHv6WbFg0VO eY47GmzEpyHSShlwRzs/j5J6d92LuP83BK1OlPIxuaaWlPqbCxVoiB37B9L/uxymrhq/ rHGmReQwf67N1993884WcKGAAnZDmOA582kL+KHNwLePJwnBFxfYect201SuqzZgq2dl IAbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=U9N7UGhQON+gI/ng6qZFxfvVySNzQpvfR8FPw13NHic=; b=WOsTqI41quZ3+BbHgduEhoJ0M0ogNvJGXplXoLrcFu1b0xUkR5e2vJgFOogpJ/vSHw iOsVblSdACeOl7XjsZ5+eNMZfTe6g0MEeHpIXp0qaF2F8XyJ6N0SPkEn5ZJeAs3OUbCG TI37Tw+OY17zKwDzMMrXkNfp7rpmVv6G0be5tNf2MKJ7Tpju4aCWsy31UXmds7Y0Hi5G P8VQ9FCk3sA5UdPQcjBoA8yE9ws9UT3xGdVpwUIozIHCb0clxHvVyvtUlNiIwJ+f+hoG 29yw4xkPCPOLQ4UjiEws+fEb/GNPgFuJM7vBrusmwmVeTfqJHZC3x/4NmaPBeYYBJs8F hYag== X-Gm-Message-State: APjAAAWuwqkjcs2dgDiBkKrDpMShGwKrnbGb7a4FwNRCcYpMKNE4byhp Gwb+EhASLOw1EyNVDgBxmqdHZgDOMRE2VBz6yFaF9Q== X-Received: by 2002:a2e:960b:: with SMTP id v11mr12784869ljh.135.1556010135246; Tue, 23 Apr 2019 02:02:15 -0700 (PDT) MIME-Version: 1.0 References: <1555048943-39589-1-git-send-email-wen.yang99@zte.com.cn> <1555048943-39589-4-git-send-email-wen.yang99@zte.com.cn> In-Reply-To: <1555048943-39589-4-git-send-email-wen.yang99@zte.com.cn> From: Linus Walleij Date: Tue, 23 Apr 2019 11:02:03 +0200 Message-ID: Subject: Re: [PATCH 3/5] pinctrl: st: fix leaked of_node references To: Wen Yang Cc: "linux-kernel@vger.kernel.org" , wang.yi59@zte.com.cn, Patrice Chotard , "open list:GPIO SUBSYSTEM" Content-Type: text/plain; charset="UTF-8" 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 8:01 AM Wen Yang wrote: > 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/pinctrl/pinctrl-st.c:1188:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1175, but without a corresponding object release within this function. > ./drivers/pinctrl/pinctrl-st.c:1188:3-9: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1175, but without a corresponding object release within this function. > ./drivers/pinctrl/pinctrl-st.c:1199:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1175, but without a corresponding object release within this function. > ./drivers/pinctrl/pinctrl-st.c:1199:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 1175, but without a corresponding object release within this function. > > Signed-off-by: Wen Yang > Cc: Patrice Chotard > Cc: Linus Walleij > Cc: linux-gpio@vger.kernel.org > Cc: linux-kernel@vger.kernel.org (open list) Patch applied with Patrice's review tag. Yours, Linus Walleij