From patchwork Tue Nov 20 16:14:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10690721 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 D60F61923 for ; Tue, 20 Nov 2018 16:20:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C385A2A92C for ; Tue, 20 Nov 2018 16:20:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7DDC2A973; Tue, 20 Nov 2018 16:20:40 +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 540CF2A97A for ; Tue, 20 Nov 2018 16:20:40 +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=1L+Vx9cOAZDljzp1Xy5ZzYTheD+FEWqwGnpAiY80J/E=; b=gbU Scl+dc0V2lsr9UyglNz8llegA5UCznTplcrxEYoF8deTEuiideU1Y8VdEzVcuf0KaOhVnsumOeENb Jn5lKj4xa4WlAeHi6B4Nde5dUSlotJR31ww/d16m1vpdsDxaNV0J6SLmjXabjMc0tCkOi0O9ANqYk 07ZAkuNJWBRCCJFYqtW7zQtMXesx2xjMNKRkmYGOZd15upu/4t6zibP6DYbX1BLZiaOlrsScGaahs /1cAl7uREVpej0kuzZzbRvM0Q6bbHNc0SJNtSFFVZG1p81EFWHkWi+TLUO2zvfzjLGcaDv65aZX1n avdLiLW6y6n1XCQD6fSHnDle5ELEkJA==; 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 1gP8lT-0005aE-Fs; Tue, 20 Nov 2018 16:20:39 +0000 Received: from casper.infradead.org ([85.118.1.10]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8iO-0000HZ-Gy for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Nov 2018 16:17:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Message-Id:Date:Subject:Cc:To:From: Sender:Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=icG4bmiET/r/7w70hgZxOnB5CF+WQudUNNBCnkqQen8=; b=O8XP735kEfrdiIGJSs0CRZbEx slby5sH14eFlEmwf4PAFQQCNQBp6KF4NkxO/A1u/DmNfTjituraP2G1QxuMlokWWaoYPmeCeY7g+6 RKy9GLhccL4YcW8KIMumaz9N8ekeuc2NugEgPoApa058H+lyV4Q0b8h/vkrM+UIcOxGriF6FdSYdK KkL993DRYOjgxuIjXHuSXP+A1rTA+68lukAWBuNSZlvcZOOUG+vWq0lzO2n/pZEPLRLcX79iIevWp jqaSkkJ6F1hzc2Rc5nCwj/8zKUADf0FfpM6P9xXGh1Zx0ESWnTIDVAOwhyndY0zTtpm1A0zj7z3AO KZVxou6bA==; Received: from mail-pf1-x443.google.com ([2607:f8b0:4864:20::443]) by casper.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8h3-0001dl-V8 for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 16:16:08 +0000 Received: by mail-pf1-x443.google.com with SMTP id c123so522451pfb.0 for ; Tue, 20 Nov 2018 08:15:55 -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=icG4bmiET/r/7w70hgZxOnB5CF+WQudUNNBCnkqQen8=; b=TNDRHd9/xDKOUVPUah0iUJUSHs5IqJdqh/1nvWB6IMuq8zQ/+PXeRc7kt65VUR/znY jCJLAIar59VsQ9bCwXz7eMUYeiIsodbIAaFRSq5uu+s8fHiezT0EvlWPucBs+kvRRpea DHeL+dNJjwHsa3NkwIsI/qaT7OM3etdiKMcl2vvcpQ3PDvSSMvTv/EGteYlSniO5fxw8 8IuKpzfmVMnhG9M7NMPBhIdyLQyVm7qGRFtIIaqZEBJh1m3lot2DMi83NAADKrY4aDaF 1iI5bEAbN6aO5XPxaskv2t5KqGU464HCJzRccJzHeRJHKm9dIHTvxwoARgUfk758Asss tksw== 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=icG4bmiET/r/7w70hgZxOnB5CF+WQudUNNBCnkqQen8=; b=ZRjLbRUvNU9ZfNTZg+ITX7Rymbp5hvMyCtnvI3dSyhOs7QlqOzTbTEz+1d3mGpCgdi GhAkjj/h1M57G+0y+0hKaJyr9Tczc8sVtzXVNbfOaimku5k2lyme3q/egGhc/zJYT8rc RFNgboZxSSJ4SSLRssYTb9FjcJJL2sEPrt3Y2glktFXnhK8MtuD4OlBSrRKXYUMbNPYw dWCBOqM6kRU3Zfff6u8clXVqLU65romHxLw4Zs5JKMq2kJiRvCE6WwnwMSZ+VbRbLNBC ijdcv9+c9m6brPgGYvuPcnDzOOP3GbuwCC5w7lQ9hLZ1oLXb8jWV4XAc7CuaXehbgPC3 j3iQ== X-Gm-Message-State: AA+aEWaUr2r9G43m+Ba9HLl4xb5oKBNCuIqjEpQwtfKCMpkduwqhC8wU jD7Ca26iFWibhjlTchr6XpuV3UElJEo= X-Google-Smtp-Source: AFSGD/WtM73/BJgnSCAROjbR2b6hNKqMQ/HLyAZ5mbBGWUso4hk3o11xBXD2rHsD4zkU+VFclA/gPw== X-Received: by 2002:a63:4d:: with SMTP id 74mr2528264pga.248.1542730494065; Tue, 20 Nov 2018 08:14:54 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id b2sm64565196pfm.3.2018.11.20.08.14.53 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Nov 2018 08:14:53 -0800 (PST) From: Yangtao Li To: rjw@rjwysocki.net, daniel.lezcano@linaro.org, lorenzo.pieralisi@arm.com Subject: [PATCH v3] cpuidle: big.LITTLE: add of_node_put() Date: Tue, 20 Nov 2018 11:14:51 -0500 Message-Id: <20181120161451.21149-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_161605_992566_B02CA77F X-CRM114-Status: GOOD ( 14.16 ) 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 of_find_node_by_path() acquires a reference to the node returned by it and that reference needs to be dropped by its caller. bl_idle_init() doesn't do that, so fix it. Signed-off-by: Yangtao Li --- Changes in v3: -update changelog --- 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;