From patchwork Tue Nov 20 15:46:17 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10690647 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8C73113BB for ; Tue, 20 Nov 2018 16:02:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 775592AA0A for ; Tue, 20 Nov 2018 16:02:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BA962AA6D; Tue, 20 Nov 2018 16:02:16 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 40B652AA2F for ; Tue, 20 Nov 2018 16:02:15 +0000 (UTC) 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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=TO0QmA6KCqq8OhPEMxZpXkFvSx/Jw1OdvsziiolFj84=; b=OpB IXj6PA0KqUtG9KkNq8Nh8vSoYaPO1m4cYXU7FYkgiaAj+w0eqFxCbeY9MS8TEJxG1Yga17Ri4AnmM E0NPsadOcm3t6jCLnt0CGwIotEMpcw2vRLeVdHQEWMxIqBblpPa+BquuNVyagFIzDDHdZxaWOrekO jd6N2p6WPjVxNcAvQTs+yN/18hXYZUKzHXy+PhySzGOjjyxFUGBGuth+THmmf9E4e08JvQUmRgEAf MoWF8BR4o3fqozNZ1FoDovZhwx6Le857yQU7QkvboA0zRpU/0i1v6kP0ZxxOKk9G483Yov79juiEN VJbRS48LcEyTaqtiYucnQ6yUcLTFDRA==; 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 1gP8TX-00078l-JX; Tue, 20 Nov 2018 16:02:07 +0000 Received: from mail-pf1-f195.google.com ([209.85.210.195]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8HM-0003nU-8S for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 15:49:46 +0000 Received: by mail-pf1-f195.google.com with SMTP id c72so1179404pfc.6 for ; Tue, 20 Nov 2018 07:47:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=kDTNf0YfFqmPIA1/Izli7zQXedYowG6g+6+gdNz3G1k=; b=I2bkaT4pycDlR63CnTw+LcgtoihDjkoAbDAoIEayFGe0O54ZGs+Za/i1NnV9unl2qc n1qEyz6zKhzq85Kx91XmNi9VTOr2yZsC0wySIZUThUoN02M9yaikcbTO+cVSbb6+1R+Y 5TIHspzc2e2ldo8K2MrjorO05wOeABzID0Jocr1z2/wO1R1jTVg0wGAjOQ87YAq0Fwpr Q/M0AEJKHFlYsd9Z1G0UvNAL/r/Ml93uGUU0prr5wJ3U/mgYLMHBuYAm9kFdiF9QTXuH BEMP6fTLkePkwiGkanb09ZAKZonqHx2RIgqAwDu16GwDHIM0BCSHIZmly010D6b6B+4/ Amng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=kDTNf0YfFqmPIA1/Izli7zQXedYowG6g+6+gdNz3G1k=; b=MwnF23CsQUTF+zxZPbFxA+9ie1dDpOiYFUG1ZiDM29qmYM+miA/4e/NVukWvRnLpCi xJ9ls41JHV34oQ5jVIgsOJyVFzp7gIhuNzWGs3A8L/cGsrffUQSUZKlKgroOoUHVHK7x T996JYmnFqBgwCEPu9pp7HdsMQgvnZIkgEb/sBhTyUD1JuYTnE+Ccp0XrnAU9MoG9FW5 jLrH93KwufaCQLHjTi9WQuivRA1jGYKYpD88OvQQN2876EQaxAZVw8TxBVYEji0Gbd4b 5/k0TJDpkE2R1CXrqt3bDIRvuvTGQ6HKsWHKlpRri121DhqdCyZwgxQl9M+jJNqLHXga QYvA== X-Gm-Message-State: AA+aEWawvqbgRlVl4zbNThKkusxPAqAVgw2yEIZR2lEc9D9UMRgAq7X+ d9CB8FSqvvom3yTXbsW4Q1Y= X-Google-Smtp-Source: AFSGD/W7l3HuINN23UnBtDu7PDb2C7ptl8Dd/7Zh2XOvfEMIMse2rxGjIsCy3MvP8CoC0t7j0k/uuQ== X-Received: by 2002:a63:2141:: with SMTP id s1mr2390804pgm.148.1542728781340; Tue, 20 Nov 2018 07:46:21 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id h17-v6sm61988023pfj.125.2018.11.20.07.46.20 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Nov 2018 07:46:20 -0800 (PST) From: Yangtao Li To: lorenzo.pieralisi@arm.com, daniel.lezcano@linaro.org, rjw@rjwysocki.net Subject: [PATCH v2] cpuidle: big.LITTLE: add of_node_put() Date: Tue, 20 Nov 2018 10:46:17 -0500 Message-Id: <20181120154617.20903-1-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181120_074932_857406_69240377 X-CRM114-Status: GOOD ( 12.59 ) 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: Yangtao Li , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The of_node_put() is missing.So we call the of_node_put() to release the refcount. Signed-off-by: Yangtao Li --- Changes in v2 -update changelog -do that right after its last use to also cover error handling. --- drivers/cpuidle/cpuidle-big_little.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c index db2ede565f1a..650f063ef809 100644 --- a/drivers/cpuidle/cpuidle-big_little.c +++ b/drivers/cpuidle/cpuidle-big_little.c @@ -174,8 +174,12 @@ static int __init bl_idle_init(void) /* * Initialize the driver just for a compliant set of machines */ - if (!of_match_node(compatible_machine_match, root)) + if (!of_match_node(compatible_machine_match, root)){ + of_node_put(root); return -ENODEV; + } + + of_node_put(root); if (!mcpm_is_available()) return -EUNATCH;