From patchwork Wed Jun 15 09:48:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liang He X-Patchwork-Id: 12882055 X-Patchwork-Delegate: viresh.linux@gmail.com Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ADF0CC43334 for ; Wed, 15 Jun 2022 10:19:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346203AbiFOKTG (ORCPT ); Wed, 15 Jun 2022 06:19:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229590AbiFOKTF (ORCPT ); Wed, 15 Jun 2022 06:19:05 -0400 X-Greylist: delayed 1841 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 15 Jun 2022 03:19:03 PDT Received: from mail-m964.mail.126.com (mail-m964.mail.126.com [123.126.96.4]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DECE53C72D; Wed, 15 Jun 2022 03:19:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=126.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=5F7kf wbdaKQzAx1CeFIWQhfk0x5hvs0Zur6uvxwjE1g=; b=CpMMRuH4+q/UCuKjyMMQS W9tDJ3ONBTARgU8mYo9e40Rr63yd41yhI6HIPu5wOABnC9fsQ7UjuKxLmy23GUR2 xU/9cZNxbRdBL+BvSmO8EhfHlg2eIqCKux2HKgx5g3xm7ahGVD17M4ged01IDEWG 168lpIyAZNaVvm4Q01eInc= Received: from localhost.localdomain (unknown [124.16.139.61]) by smtp9 (Coremail) with SMTP id NeRpCgCHdZrZqqliYE4hEw--.44531S2; Wed, 15 Jun 2022 17:48:10 +0800 (CST) From: heliang To: rafael@kernel.org, viresh.kumar@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, windhl@126.com Subject: [PATCH] drivers: cpufreq: Add missing of_node_put() in qoriq-cpufreq.c Date: Wed, 15 Jun 2022 17:48:07 +0800 Message-Id: <20220615094807.3962918-1-windhl@126.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: NeRpCgCHdZrZqqliYE4hEw--.44531S2 X-Coremail-Antispam: 1Uf129KBjvdXoWrtFy3Gr1kAr47CFWDXw43Wrg_yoW3Crc_ur y3WrW7Wr4UC3ZFqw13Cr1Sy34Svw13WFsYqF18t398J34UAryYg3yvqr9rZ3yruw4UGFZx A3WqgF47ur4UJjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7sRtRRRJUUUUU== X-Originating-IP: [124.16.139.61] X-CM-SenderInfo: hzlqvxbo6rjloofrz/1tbi3BohF1pEDuW8kAAAsp Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org In qoriq_cpufreq_probe(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: heliang --- drivers/cpufreq/qoriq-cpufreq.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/cpufreq/qoriq-cpufreq.c b/drivers/cpufreq/qoriq-cpufreq.c index 6b6b20da2bcf..573b417e1483 100644 --- a/drivers/cpufreq/qoriq-cpufreq.c +++ b/drivers/cpufreq/qoriq-cpufreq.c @@ -275,6 +275,7 @@ static int qoriq_cpufreq_probe(struct platform_device *pdev) np = of_find_matching_node(NULL, qoriq_cpufreq_blacklist); if (np) { + of_node_put(np); dev_info(&pdev->dev, "Disabling due to erratum A-008083"); return -ENODEV; }