Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2000954yba; Mon, 15 Apr 2019 02:54:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3i0Po/D/Vb6DnErRRbX8CuxjIWdES0yKGMrCI4rRRVLu9s/keBsMDKrYRZaYu0gHVbcFo X-Received: by 2002:aa7:943b:: with SMTP id y27mr50302179pfo.59.1555322077395; Mon, 15 Apr 2019 02:54:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1555322077; cv=none; d=google.com; s=arc-20160816; b=vUeN6HUYjoqOLA43tiQVf0D4f7R+40RHJSvYGF6mHEJywfT6Z0om0rXOLC9DbtHWRe eUP5ZOHCQuWTcArDg8YnHqR1Mflpbh/tvbD9t73p/hPpnRqvdEEwYKnMXNvqtppg+sVD 0t1o73hQ2VdJABs2XKiJB8jg/ds4nKmblb66EfzXopxdYEi9piS4owsmbVzoexsJcxm9 71TFMOBa/tX+5kIOC3iiMgOqUkWw/m9EIkAFZjV2CzkIVt8h+fGB3nw7pLr6o/nmC03a 5O6XaosG4x/uxH8YUsU50+gLDOGBDWgJJ0HHqJbgUwrEX3dX0SM2SvD1+bulAQw24vUV MGLA== 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=dE8oThaoQA9m3plqdG3WIPqIKM1d2jkt8oFQ26liqRY=; b=xLTuvetdHK1sXwkOmHAOL1bHGTHvXUABiejo/fw7owo10l1zbh3NGLuz9yHqPs3sZk p8GVhWzlUrxdPfiu4JI1KWZF/lVLPaOrAdXYNOUy+Sd9Yd+/55Z/7kBGdCF2l3PHKozd ovw7EoXsy7iGNw/i2hxpIfQnI26Pt6mWD2HYkOdjNjenVq1VMjQFYTHiGSRxEJpDtb+y YHuhgvhQNXVM9qyX/KzY06wbkDKF+UqHlS5hI12YOzUs4W6B4BdYR1OOAjp9t1+l5Sdf CLiZ6SHv+NJZ+z1ToCV29bGPT652aJ2uIR1QRn6T4ENcBnUtBEUR5DtPWThxU4vP3SU0 8Ryg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gd7sR54F; 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 u71si26807797pgd.147.2019.04.15.02.54.21; Mon, 15 Apr 2019 02:54: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=@linaro.org header.s=google header.b=gd7sR54F; 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 S1726964AbfDOJw7 (ORCPT + 99 others); Mon, 15 Apr 2019 05:52:59 -0400 Received: from mail-vk1-f196.google.com ([209.85.221.196]:36779 "EHLO mail-vk1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725798AbfDOJw7 (ORCPT ); Mon, 15 Apr 2019 05:52:59 -0400 Received: by mail-vk1-f196.google.com with SMTP id w140so3493374vkd.3 for ; Mon, 15 Apr 2019 02:52:58 -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=dE8oThaoQA9m3plqdG3WIPqIKM1d2jkt8oFQ26liqRY=; b=gd7sR54FQTjclKZU/Kih/BTRkrELqURoL+6f7b3GXmlcMb+k3ZJzjaypcIV1CMKa8d joTk9D6moFNLcrtGW2KMANZGc5kqPrubs9SK71Z/cTDBQhQtl80MFAUIqLZA+jO8hWne GDFxnuMJbCFyNewwhVlpnfMBPFs3+mW6S5MOmOp2q+y959RD8gXpWy89oCe16GEGUfrE n09vZ2jPFIcjCCJ46qhSiewLhvRK1D5kJ0R7nO7lgqxzcEsX2t+5DqG4wV2N7DUGqKFB VgGnlW3myCF4jVIMPZODC6pv54u4USFeLHNUdsa2DrYeSNvdQNo7ehaF2wRX9Sj2QgLW EiOQ== 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=dE8oThaoQA9m3plqdG3WIPqIKM1d2jkt8oFQ26liqRY=; b=RZZlT4f3DFkgdqQOrEpw68f97b6VMbX/7pk11rXONy93W2zETT90Zi4Kn6ylQAb9NU CVzljLwM6Be652ihmdPPv1x5HK/x6dbit0lXV1bIXggiLQuNpxlovv+ua0sQW93PJM3n 9rNOlcNRQMwlpb307o0U56W6m0hoBHqmzB1ZCmoK3Axs0ql7RFaMZy+1vA58TAu7dPiK jYrEgkQjayu8FmL1yeZooZClf0zj/5XnkyPswT0vhhSMQpSN7PXFM9Toy8uYBlsWkEjX tPU5b4SuJ1LggGl3OdHOD9s4IaOFV88cXHgQZHxSFEEFmegiCMHipcLAI2YU6M0rf5Tc OP+Q== X-Gm-Message-State: APjAAAUiMBwl7w6sVwLtLlz/m3FStTQmDTv7fUyOnyXvu9xW6ipr8dte 4MreO9CTAWpgYZ9gI6o6uvPq9dq98N14syhA9LIu3A== X-Received: by 2002:a1f:2c8:: with SMTP id 191mr39174140vkc.29.1555321978094; Mon, 15 Apr 2019 02:52:58 -0700 (PDT) MIME-Version: 1.0 References: <1555139666-948-1-git-send-email-hofrat@osadl.org> <1555139666-948-10-git-send-email-hofrat@osadl.org> In-Reply-To: <1555139666-948-10-git-send-email-hofrat@osadl.org> From: Ulf Hansson Date: Mon, 15 Apr 2019 11:52:20 +0200 Message-ID: Subject: Re: [PATCH] ARM: ux500: add missing of_node_put() To: Nicholas Mc Guire Cc: Russell King , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Mark Brown , Linus Walleij , Tony Lindgren , Mike Rapoport , Janusz Krzysztofik , Linux ARM , Linux Kernel Mailing List 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 Sat, 13 Apr 2019 at 09:20, Nicholas Mc Guire wrote: > > of_find_compatible_node() returns a pointer with refcount incremented > so both in the error path as well as after usage in soc_info_populate() > respectively actually b8500_read_soc_id() an explicit of_node_put is > needed to release backupram. > > Signed-off-by: Nicholas Mc Guire > Fixes: commit 18a992787896 ("ARM: ux500: move soc_id driver to drivers/soc") Acked-by: Ulf Hansson > --- > > Problem located with experimental cocinelle script > > get_maintainer.pl only returns linux-kernel@vger.kernel.org for > this file ? Is MAINTAINERS entry missing ? drivers/soc/ux500 should be added to the ARM/NOMADIK/U300/Ux500 ARCHITECTURES section, which is maintained by Linus Walleij. If you send a patch, I am sure Linus will ack it. > > Not really sure about the referenced fixes commit 18a992787896 > ("ARM: ux500: move soc_id driver to drivers/soc") the commit log notes > only that the driver is being moved and not expected to change (v4.8) > but looking at the previous version in v4.7 it does seem that while > moving the driver there was also a relevant change to the driver code > including the switch to using of_find_compatible_node(). > > Patch was compiletested with: u8500_defconfig (implies > ONFIG_UX500_SOC_ID=y) > > Patch is against 4.18-rc3 (localversion-next is next-20180706) > > drivers/soc/ux500/ux500-soc-id.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/soc/ux500/ux500-soc-id.c b/drivers/soc/ux500/ux500-soc-id.c > index 6c1be74..e22597d 100644 > --- a/drivers/soc/ux500/ux500-soc-id.c > +++ b/drivers/soc/ux500/ux500-soc-id.c > @@ -203,10 +203,13 @@ static int __init ux500_soc_device_init(void) > ux500_setup_id(); > > soc_dev_attr = kzalloc(sizeof(*soc_dev_attr), GFP_KERNEL); > - if (!soc_dev_attr) > + if (!soc_dev_attr) { > + of_node_put(backupram); > return -ENOMEM; > + } > > soc_info_populate(soc_dev_attr, backupram); > + of_node_put(backupram); > > soc_dev = soc_device_register(soc_dev_attr); > if (IS_ERR(soc_dev)) { > -- > 2.1.4 >