Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3626876iog; Mon, 27 Jun 2022 22:11:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vFmzm2U6ApUYfJ3JxEGyGNeu5V0hLGk0VUH+Z8En6U0oaqeIrIM5X4wGxG+tFUXRrB//Lp X-Received: by 2002:a17:906:970e:b0:726:3b59:3eae with SMTP id k14-20020a170906970e00b007263b593eaemr16694236ejx.702.1656393113975; Mon, 27 Jun 2022 22:11:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656393113; cv=none; d=google.com; s=arc-20160816; b=v9VeClC5GvoMF2gqAPjqbG2ShO9/CuGe+ETXRUyb5J/6I/8GRJVNsXkSMingJTELng yJRzSFTOywWjtIsu2gEWCJrUIetYPUm/mKOjtutsBba8Pffbpx/QS71h9UmJCMQNZHpG RayrkFiijsjc6Vitnb//wTfzlwHU0s3UvuoUgZU4yi7V5Mio+1SVQd7mprqSOIVn+PBj ZMfDrcZAFR8ZQ9b+Oh0MBE/EgD7OEfuiT0wLOW3iR0F7dc53MamcyfMQSrUnw5PxsE0j iT94FFLeAAMICV52pOo0Ze51MWsMAft7cauDtb0S6FSdVGHwU77fDkymQR0u9eW9AqDv 5K5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=z1w//0I+HcJfmiDZpUQEwDmKgQbnBHSDBGackVzH+F4=; b=PrUlURcFQqJZBe0L2NHql0Q0UgMSJL5UcbW3dsrTnw3z511ZbkhJrs6wJG8mxt2uP7 keiqOPFO3uIMqV4TcAZSFWsI73aXSlQUC0geuCqTO9Bb2ZDP4M4+poL5j+bg3HE4ZNNe tnxSw3kEEXJhE6ZR5dU6nY/tkQiKZ9omdix/ylQ/5nnZXL1mikTC+d/udWRo5rXAl77F SktB6lthRSEayU2cmJVT2zkmPXDkDhVOigt7tjYFs09MZsiarO7K5SVg807qPQ+8BOI9 boDk2efSVFLtF0CKYFpViNEbuxcSRcw8UgDmTkQPn9yb0s/kCjTdbxP5N2nief9GS34S 8VAw== 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 ot15-20020a170906cccf00b00725ea31cfbfsi12569390ejb.406.2022.06.27.22.11.26; Mon, 27 Jun 2022 22:11:53 -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 S243718AbiF1E5R (ORCPT + 99 others); Tue, 28 Jun 2022 00:57:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44552 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232942AbiF1E5P (ORCPT ); Tue, 28 Jun 2022 00:57:15 -0400 Received: from muru.com (muru.com [72.249.23.125]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2113560D5; Mon, 27 Jun 2022 21:57:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTPS id B2D718106; Tue, 28 Jun 2022 04:52:01 +0000 (UTC) Date: Tue, 28 Jun 2022 07:57:12 +0300 From: Tony Lindgren To: Liang He Cc: linux@armlinux.org.uk, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] arm/mach-omap2: Fix refcount leak bug in omap_hwmod.c Message-ID: References: <20220618014747.4055279-1-windhl@126.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220618014747.4055279-1-windhl@126.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,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, * Liang He [220618 04:43]: > In _init(), of_find_node_by_name() will return a node pointer with > refcount incremented. We should use of_node_put() in fail path or > when it is not used anymore. > > NOTE: As the ref will be passed from 'bus' to 'np' by the xx_lookup(), > in normal exit path, we should call of_node_put() at the end use of 'np', > not the end use of 'bus'. Looks correct to me. What about missing of_node_put() for of_get_next_child() also in the _init() function? Regards, Tony