Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp579521iog; Fri, 17 Jun 2022 09:04:00 -0700 (PDT) X-Google-Smtp-Source: AGRyM1s2LclTmab9IoniZ3T4t1W3HDPYXqWDXtFRNynq12WuCXe2XO+C1e3x9nQ91Qjfr/U0kfTn X-Received: by 2002:a17:906:e097:b0:70a:6e59:4c85 with SMTP id gh23-20020a170906e09700b0070a6e594c85mr10340352ejb.323.1655481840593; Fri, 17 Jun 2022 09:04:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655481840; cv=none; d=google.com; s=arc-20160816; b=YGu6JpDo+YXSVLk3GbRvMTTJl5Dd2U6lV3OfEoRIVM7RmC/X1h3XM3EDgwqVWrlb0E g40gTpJPUBA9MDLV6UZoBTMS9OeTRTHBPazZ88Gcw+WztIX0YAEAEbJl9bfWWqhxQ8GJ RNvML160LK/tf9PBoDxDX0gIB9x0WPtDQZsMy3RQIKK25O6ZHev+oisw1jfzRHMir0do r3VdHRJmLVM89ZpS1bvOV1P94us3bigB9Y1aG6LmprylwavW8/a/cTt3yaz04zg8DjZA LsOaNGIqFudgI80R4OaaKXPMSfqENOfdHmvTiB4PmrPT3MmRgn2U5iND+RIIy78YyRTk 28pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=ZPDCE9gXzVbZx6QkdS9H70LP3oyq8g4iJfSuRnNhTPY=; b=uCK+ko8KlfJ7FjJ2eTwRd5E8whgFU9G3gyvOq/QZKtmvGAg4mnS1BbIqULaYqwGcIQ /eNZ/gfhirwlwYUsp7cGvTRWBmshn9yWJU3ODXNkD1Ym8mtrGtRspQwltDtohkQDkF0/ JVUHIaJ+CGVbxMrOQA7i/jdk156Y5p3NsRaM/bX9a2BEo0frPgbAyBH43D5Z8NltISH7 iobehXuTDGVrJQIZiJCSqYGXob11jk3+Yr0wFQz3IaqPnzBJDw9+Tqmg6cSj7kfFv4bG Zm8yj4zYFmbfxf8O9IcB5OyafUgoqKBlZvIknuT1pI+jIyHp6VH/ZzASfXBOJwxC4GXs 9JWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z11-20020a056402274b00b004355876eed1si4895395edd.300.2022.06.17.09.03.32; Fri, 17 Jun 2022 09:04:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1382500AbiFQPkO convert rfc822-to-8bit (ORCPT + 99 others); Fri, 17 Jun 2022 11:40:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36754 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1380553AbiFQPkM (ORCPT ); Fri, 17 Jun 2022 11:40:12 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47D034ECE4 for ; Fri, 17 Jun 2022 08:40:10 -0700 (PDT) Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o2E4a-00013h-Dp; Fri, 17 Jun 2022 17:39:48 +0200 Received: from [2a0a:edc0:0:900:1d::4e] (helo=lupine) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1o2E4V-0015Kw-5S; Fri, 17 Jun 2022 17:39:44 +0200 Received: from pza by lupine with local (Exim 4.94.2) (envelope-from ) id 1o2E4V-000AxJ-U4; Fri, 17 Jun 2022 17:39:43 +0200 Message-ID: Subject: Re: [PATCH] arm: mach-imx: Fix refcount leak bug in src From: Philipp Zabel To: Liang He , linux@armlinux.org.uk, s.hauer@pengutronix.de, kernel@pengutronix.de, saravanak@google.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Date: Fri, 17 Jun 2022 17:39:43 +0200 In-Reply-To: <20220617121235.4047670-1-windhl@126.com> References: <20220617121235.4047670-1-windhl@126.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Fr, 2022-06-17 at 20:12 +0800, Liang He wrote: > In imx7_src_init(), of_find_compatible_node() will return a node > pointer with refcount incremented. We should use of_node_put() when > it is not used anymore. > > Signed-off-by: Liang He > --- >  arch/arm/mach-imx/src.c | 2 ++ >  1 file changed, 2 insertions(+) > > diff --git a/arch/arm/mach-imx/src.c b/arch/arm/mach-imx/src.c > index 59a8e8cc4469..fff2776f9180 100644 > --- a/arch/arm/mach-imx/src.c > +++ b/arch/arm/mach-imx/src.c > @@ -195,6 +195,7 @@ void __init imx7_src_init(void) >   return; >   > > > >   src_base = of_iomap(np, 0); > + of_node_put(np); Thank you for the patch. There is another instance of this pattern a few lines above, in imx_src_init(). regards Philipp