Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp351488imb; Fri, 1 Mar 2019 02:22:15 -0800 (PST) X-Google-Smtp-Source: APXvYqzpZEN8+GZZ7pIdjb6mvQycfk1Pa1hGoQCofGbCIR+MsOszVfq4V2JGHr1WMdoySAVTYA6/ X-Received: by 2002:a17:902:7202:: with SMTP id ba2mr4587123plb.147.1551435735769; Fri, 01 Mar 2019 02:22:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551435735; cv=none; d=google.com; s=arc-20160816; b=hd9CXbKpmcjHBFDLAi6sNtzI1o+T340HJV5JYJ1PEbCToyZh+ineCTmiTcxJsG1U5E xyOSb8eTUadouVeHC4+jOO2ifYDlDOlIkHST0HN76EAIJiB2qlqZs5r682tpqbVx+ixj uslJNROn3pQCSw6fBHnillA4hrn8upQS4Ky0uhRSZvVOjsm5TQpz86veNdmA7pS+jJpV HP+GjImnOOx7KaZOCS4Qv7XWE/67Hadip0RuS73nMIcaGqnFkjESJaEDUmsqBbqvN2EQ hRgN2rJqDvVHfHXayp1uC0uEyzAvJpNgvsqt20DxpLmx+LooeuckoovBOC0mAD7CiEY3 B9/g== 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; bh=5wRZYJMbL7YK8sFkJdZpCHVpLmSHoA0VUyOgYXV8p3E=; b=l7W57ixmMU+aWkn0u6QfD8AL4IuQdrhoxZUwSW6VPvB5LS+F8QDJsOkAHmsfU8pdkp ZiiDxVOjd21GfQOevdyKi4DQi2ZDUrfO3yK1MW4zR3e0MMy51LyeUenxCvFY7ZjnCSoW MO2TpGjvOaFcQJus8eXnvtWoSx8IAO4fGkvLCxBE2Rcz9dO62J67QFyv14tqSyu7hSvp zBI9CnsumiVRrW5Ma+InI8bIR8DZXTL9ry9jsvDBgjKWflYBoJzfY5qf7Xw1xZjPO9o1 9G5Htw8RHss95yhCHbmbM88lKaC+W7JzNcVEQ3K8SzIb/4FzmTPbPqd0gGfxJKmuHVLr TZDA== 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 n9si11724592pgi.422.2019.03.01.02.22.00; Fri, 01 Mar 2019 02:22:15 -0800 (PST) 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 S2387527AbfCAJvl (ORCPT + 99 others); Fri, 1 Mar 2019 04:51:41 -0500 Received: from mail-ua1-f66.google.com ([209.85.222.66]:41050 "EHLO mail-ua1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727915AbfCAJvl (ORCPT ); Fri, 1 Mar 2019 04:51:41 -0500 Received: by mail-ua1-f66.google.com with SMTP id j7so7095073uak.8; Fri, 01 Mar 2019 01:51:40 -0800 (PST) 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=5wRZYJMbL7YK8sFkJdZpCHVpLmSHoA0VUyOgYXV8p3E=; b=SN3tDlSldR4eZIQ5olWibakWmqF3VIn+IO/vmjsDUUdILr0RMgaTp+rpehsJsgTSoI rL4oo83qlKoIzNGdQ+1AnbJKlwov5ELQIukCcUjyAh04UrROxw+m4D8WQvuFJd6jhiTU z6qRh2hsDERyg//q9jpNVRtrO9JS/J/fPhCMsbTO9MTC2gaWST0U6W0TsIhm8s8be1YV PsYFUcoBOrTmQiw7kOzrj2UmbD9rGyqm9PXv7waZllkwldyNIsApKVlOKewpfr9S+4g7 L5lgmj9mvVp+1Gld0yjE/hEs3rBcK2poro6cDoNt3REmYCExoWwoZboe1toMFkjd1t2+ crFA== X-Gm-Message-State: APjAAAWjCUHRHBI0O7kwcnSuUW/XjIobnkkEEfom8TJWop4wgIXQPA/o /ofS8RixlHJivCatdpJowToG2Kpy3CcB6YvLrfQ= X-Received: by 2002:a67:78ce:: with SMTP id t197mr2151989vsc.152.1551433899715; Fri, 01 Mar 2019 01:51:39 -0800 (PST) MIME-Version: 1.0 References: <1551430616-42014-1-git-send-email-wen.yang99@zte.com.cn> <1551430616-42014-8-git-send-email-wen.yang99@zte.com.cn> In-Reply-To: <1551430616-42014-8-git-send-email-wen.yang99@zte.com.cn> From: Geert Uytterhoeven Date: Fri, 1 Mar 2019 10:51:27 +0100 Message-ID: Subject: Re: [PATCH 08/15] ARM: shmobile: fix a leaked reference by addingmissing of_node_put To: Wen Yang Cc: Liviu Dudau , Sudeep Holla , Lorenzo Pieralisi , Russell King , Linux ARM , Linux Kernel Mailing List , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Michal Simek , =?UTF-8?Q?Andreas_F=C3=A4rber?= , Manivannan Sadhasivam , Dinh Nguyen , Heiko Stuebner , "open list:ARM/Rockchip SoC..." , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Linus Walleij , avifishman70@gmail.com, tmaimon77@gmail.com, venture@google.com, yuenn@google.com, brendanhiggins@google.com, openbmc@lists.ozlabs.org, Wei Xu , Maxime Ripard , Chen-Yu Tsai , Catalin Marinas , Will Deacon , Simon Horman , Magnus Damm , Linux-Renesas , Shawn Guo , Sascha Hauer , Sascha Hauer , Fabio Estevam , linux-imx@nxp.com, wang.yi59@zte.com.cn 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, Mar 1, 2019 at 9:57 AM Wen Yang wrote: > The call to of_get_next_child returns a node pointer with refcount > incremented thus it must be explicitly decremented after the last > usage. > > Detected by coccinelle with the following warnings: > ./arch/arm/mach-shmobile/pm-rcar-gen2.c:77:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function. > ./arch/arm/mach-shmobile/pm-rcar-gen2.c:85:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function. > ./arch/arm/mach-shmobile/pm-rcar-gen2.c:90:2-8: ERROR: missing of_node_put; acquired a node pointer with refcount incremented on line 66, but without a corresponding object release within this function. > > Signed-off-by: Wen Yang Reviewed-by: Geert Uytterhoeven Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds