From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B6E36C10F0E for ; Mon, 15 Apr 2019 09:53:07 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 83D142070D for ; Mon, 15 Apr 2019 09:53:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RNF49K+6"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="gd7sR54F" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 83D142070D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=WDL810JLg1HJUXh8ieZ+3aXI4f30A00owdEcIODCJGc=; b=RNF49K+6OlHrqV oGoMhXdJo1AJmxgbwLPjvONUgugXdb6t/FM6nSFrwtzBYNwlPbhl/ntA8vtrYHtLNOz3HKwJ72xEA 7B/1uieMqc3wpH/KcXDvI54V4kYJUkEZ657T23Bz9L9Kbzdg+UQHT11oRcpJ2wlfOSIFEi6UCIBvA 3rSYdL+HvwZ3RLNXwOnxbvnCoTVDuAu6aR/P34vkn5M8Bc8602l6KFiu71fzUd3Fv1KaYbASInFkM wipMGJRgV7LQ0pLFnLEFq1/aJGf+afiy3APNaCn23cpcrhUneZqmCv5UXYJ9phCqhmn8YQr2bljWF k6aUVggj+2d57nAb9C6g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFyIQ-0005b5-No; Mon, 15 Apr 2019 09:53:02 +0000 Received: from mail-vk1-xa42.google.com ([2607:f8b0:4864:20::a42]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hFyIN-0005ac-TP for linux-arm-kernel@lists.infradead.org; Mon, 15 Apr 2019 09:53:01 +0000 Received: by mail-vk1-xa42.google.com with SMTP id g24so3497677vki.2 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=qviV7CHhmame+wAa2SyvVD7iEqdBMKKJ98702/5tetsBIggr0mrFyG5SkF4khEUly5 PnAFYcRtAvyz1NeYz4M47BxUW5a+09FHyETUCjRKQmzv7xTQL2Q4dk3TODd9M0Sqmozo aiGNUTvMBlZWNmlRjwcbcMowf6da/lzl738aiJzyOFhy94eGRkvCByxDwXBeXL14aeSD pP23HoUP04bSBFcxLkHDGCKNn6eRbtPuxMUHwt5JlGbddF5zApiei63U42gYg8apJywf MamMjXl8rxP5saTuGdiPEgP3PVzw40vLCLbOmpgT7qCAlO2NOWWkrA4UCIFQ9Yldmxvz bAAA== X-Gm-Message-State: APjAAAVI9pTq3SXHbCqFAmmhhQJdhUcc/BMZwGL/9sTq+9F0opNKVDlq 7HkaNHUbybB+w+9dxt2Iju2JPDkdVnGLxYcMTaHQYQ== X-Google-Smtp-Source: APXvYqyo8XOegxXlrYzTMUm04C937tM2W61ZtmLW5qJ2m1lxHPqyJKHt4EwZW3Fo+8L8Uy6yynewORwaL263Ml9ODUg= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190415_025259_958107_9F19450F X-CRM114-Status: GOOD ( 21.54 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mike Rapoport , Tony Lindgren , Shawn Guo , Sascha Hauer , Janusz Krzysztofik , Russell King , Linux Kernel Mailing List , Mark Brown , NXP Linux Team , Pengutronix Kernel Team , Fabio Estevam , Linus Walleij , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel