Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp2720506iog; Mon, 20 Jun 2022 03:19:31 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uFCsqqep6HLpLSi9+ma8D9tm3Ayqn+F51GlaHGiwf8ctY0U6yZBgIrOoOkyRg9Gx2Sic5d X-Received: by 2002:a17:906:3f09:b0:712:466:e04a with SMTP id c9-20020a1709063f0900b007120466e04amr19805396ejj.719.1655720371299; Mon, 20 Jun 2022 03:19:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655720371; cv=none; d=google.com; s=arc-20160816; b=1DSlvqb5ORBau4crsv0d6ODJ6AJL73gypKgNz8IS/WfBVfiQSv3eMTJJgwLU9utAMU I4vNHPZQVEHIZKpScgRZeDP0xAzOuihiCT9Jo8aJeJj10Llwj31sh7roq6sRZIBWjBki LFDWOVIjfcLmkVVs3EgyMsk6B3AN4zg/Yhy4updHURhSqHl3zjVzlXrICqDUTICa3MTy 1ER2C8u1Re4Nm0lpa7urQcutzbcxzjppTlf8yOjq5J/aBQ/8StFn97kfXLN3dxrPhuTv cVXe2BX4paKRKxojuZc7EUWCrPCDDBX/VOQkFXsrObtaWdMYG4JoZTqjdHU1JzqK4TBv ZNwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:subject:cc:to:from; bh=WtnJWFnDgfaKO7t5w4T5GeoFOC4SK7JH4+YO17ZGu/E=; b=ZvW/ChHSgH9tx8PW6BZkbgbZANi6kFnhHecgMiMPOarw/ax/8HKKjnFLYQTH3fLw7Q pPT6sjevF+sXsEht8XRTM74AV53j9hxJKCJSm3x5q+gtZHRAw7oVjlyCikUEG+c5o55Y jD/SkK+4YJZsopAmfNGX8lphdSx7HL3Ch769vLo/5jUdZBZB+0Ftz3PFrNjzeDODSi9T UH2Lq9cBEk9t87KCFuG3AERPSlCfOpHzPJk2JfVkZiXvYZo5jP3Odr0Lo+1g9sZ/MCTj M4MpwIswjtC09p92X3INTzmkEjK1SqUdDI9VB3819ZQEXCuLJOnqUlCmYlA8qkTAa1G9 +0aQ== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id qf34-20020a1709077f2200b00710e677138dsi13076922ejc.981.2022.06.20.03.19.05; Mon, 20 Jun 2022 03:19:31 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235376AbiFTJhL (ORCPT + 99 others); Mon, 20 Jun 2022 05:37:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233542AbiFTJg7 (ORCPT ); Mon, 20 Jun 2022 05:36:59 -0400 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 559DE13D7B; Mon, 20 Jun 2022 02:36:58 -0700 (PDT) Received: from kwepemi500023.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4LRPbL0P6dz928x; Mon, 20 Jun 2022 17:33:34 +0800 (CST) Received: from huawei.com (10.175.112.208) by kwepemi500023.china.huawei.com (7.221.188.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Mon, 20 Jun 2022 17:36:56 +0800 From: Peng Wu To: CC: , , , Subject: [PATCH] bus: ti-sysc: Add missing of_node_put() in sysc_add_named_clock_from_child() Date: Mon, 20 Jun 2022 09:31:07 +0000 Message-ID: <20220620093107.73809-1-wupeng58@huawei.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.175.112.208] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To kwepemi500023.china.huawei.com (7.221.188.76) X-CFilter-Loop: Reflected 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 of_get_next_available_child() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak. Signed-off-by: Peng Wu Reported-by: Hulk Robot --- drivers/bus/ti-sysc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 9a7d12332fad..73fd42dd25b3 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -333,6 +333,7 @@ static int sysc_add_named_clock_from_child(struct sysc *ddata, return -ENODEV; clock = devm_get_clk_from_child(ddata->dev, child, name); + of_node_put(child); if (IS_ERR(clock)) return PTR_ERR(clock); -- 2.17.1