From patchwork Tue Nov 20 13:00:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yangtao Li X-Patchwork-Id: 10690579 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 BCA9515A7 for ; Tue, 20 Nov 2018 15:57:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id ABF052AA19 for ; Tue, 20 Nov 2018 15:57:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A00962AA39; Tue, 20 Nov 2018 15:57:39 +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 37AAF2AA19 for ; Tue, 20 Nov 2018 15:57:39 +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=kUzgwW2WT6cK/TOQqUCWZsffXCvCCF3vVLC9g1TCGww=; b=GGq vwufvXjfCQgO2P6v9PuN2XaSCrCcjR0VOYCtQmN2TxNdtlPInkYqR/ZvJffVt++xUkeorjXu1bDEE tOGFL5WJoV8eFiOCEeISvNIAXBJnWFt2bxYZ74dUy0po3LcUp4W6XU5giWKAzUK7StNSgLVag4kUA MEURji9SOcFN97Zn5ZOcx86nC4ai3QWKziX8LpV8VajXZaFdcYXvXWhOgaj9Cqz+bZY8zOR19YHru Ow0gqi/NJ6/KMZlDMO93w6ynkKB330ROYU18WmxBBKCEW4UUiG1fNvUhGXEPsn73gbG4t6lB/gya+ c36t80DSL5ldaa7USbC6iF0B8/lamGg==; 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 1gP8PA-0008Ga-LN; Tue, 20 Nov 2018 15:57:36 +0000 Received: from merlin.infradead.org ([205.233.59.134]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP8G6-0003nl-Sp for linux-arm-kernel@bombadil.infradead.org; Tue, 20 Nov 2018 15:48:14 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.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=GcRCnaIVg7iubppgtRBY4JCdVqjTZM56c9fJrbK1/do=; b=Ni+oh98hXXBUUGHnJzd94wpmx b/d0fuwEyemBpB2cJmsQjLxo8ec8vJEXM1PF26X5+9ueDKsomP2DEDsg2B2m7WqopDpiSUyN7W+AG GO8k+leocqotRRn9sAQAqYHMv2zr3NMuytcwf8hj6WMiWMDA6JsFAq9ktSZteG/ljx5RcJMx8cA2X nAvZ6yyTBpMAuUsncdh9pmB+cTiIto5rBZIebLI1ujOHhwbSbjnZZkEuuIVQmh6aIo8KNcGU2aGCw yP0B6hQScLTZPTbGxGd9XZ9m/9adSHqOJOh7vxxx4COYQ1/zS8cyzc1V17LLUQaW6bgBv2edJwgZU VQhAwsGZA==; Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gP5er-0007lO-2F for linux-arm-kernel@lists.infradead.org; Tue, 20 Nov 2018 13:01:38 +0000 Received: by mail-pf1-x441.google.com with SMTP id c72so969727pfc.6 for ; Tue, 20 Nov 2018 05:01:23 -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=GcRCnaIVg7iubppgtRBY4JCdVqjTZM56c9fJrbK1/do=; b=BdWpPtjDpLdNck2TfS3K47z/uC9QbltjPZX+dfMZ2rSQSnBGjX+HAt8FkM8DoWzGQI Vv6NpFJdgk9UQ4TQ7r3l66blPH4rgxcaZfxY8jBB9vsmr534/MoZ9uI+PbL0fOn9UUrJ LVMjCVZy4oRwyVwVhIaO5K9awRobuVRsPrGiZfFWdwoE7iuZAT057LY6xrUwNPKW4uh6 MFTLJHZOgFiz1OJVNuq2kpDldUkgWi+CgzGAqOWR5rtLh3PsduDIrqANMLMb+TsUjk4h mLokOpVpIvaxdAk2U0oZfNMa7LgB1pwLHd8ltJuChyW1NJ1pbE2qbIlWMz3q03r7BWWw 6NuA== 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=GcRCnaIVg7iubppgtRBY4JCdVqjTZM56c9fJrbK1/do=; b=OIaB7eB6xpm3gfuXaBY81wztfX3LALmXyI7akqRVQJSNETQmd1hQLLpnaM3+563koj aC3n5+sk31ew9E5UTDfp6r3WXJLa5DBzyGn8LUqrC3Mo2Kbe7DqDpRcA1UX4zN75euPj QVPhiYmOQy+GWgdRhiqDZ1yioboyVeF337vuEMjb9A2LvbVF6AjXiYMalxz7tRfP10yt mxMOpWhfOSHa0h4GIaxfdwf87Nrncp3BejPo6iz2oDbsArvgqPDAnK7FnkKejWRcDPh+ gWHbTgQa9GkIAr6QtNSRFEKCZvDX8AncBt7+bMbB2actvAeJPJfpIUUIaucEIUHyiUa4 OTcA== X-Gm-Message-State: AA+aEWaH5m/gCNpqWB2nfJz/NKHJNgKArIwBjLnOAZAcqDqdoHYpM+27 1Ypmr+GqFx6PSWlM3cedHGU= X-Google-Smtp-Source: AFSGD/Xbr5NTHi/3SHW+HT9CiPgkFiRmN4K1dsNBRp82laC3x1Kajgg8ipJ2YfFV8DUp+ymm1MrUzw== X-Received: by 2002:a63:1204:: with SMTP id h4mr1805966pgl.51.1542718816413; Tue, 20 Nov 2018 05:00:16 -0800 (PST) Received: from localhost (68.168.130.77.16clouds.com. [68.168.130.77]) by smtp.gmail.com with ESMTPSA id b202sm34199287pfb.88.2018.11.20.05.00.15 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 20 Nov 2018 05:00:16 -0800 (PST) From: Yangtao Li To: rjw@rjwysocki.net, daniel.lezcano@linaro.org, lorenzo.pieralisi@arm.com Subject: [PATCH] cpuidle: big.LITTLE: add of_node_put() Date: Tue, 20 Nov 2018 08:00:12 -0500 Message-Id: <20181120130012.19471-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_080137_129467_C06130D9 X-CRM114-Status: GOOD ( 14.66 ) 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 use of_node_put() to release the refcount. Signed-off-by: Yangtao Li --- drivers/cpuidle/cpuidle-big_little.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c index db2ede565f1a..a3b8bc09bac8 100644 --- a/drivers/cpuidle/cpuidle-big_little.c +++ b/drivers/cpuidle/cpuidle-big_little.c @@ -174,8 +174,10 @@ 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)) - return -ENODEV; + if (!of_match_node(compatible_machine_match, root)){ + ret = -ENODEV; + goto out_release_node; + } if (!mcpm_is_available()) return -EUNATCH; @@ -222,6 +224,8 @@ static int __init bl_idle_init(void) kfree(bl_idle_big_driver.cpumask); out_uninit_little: kfree(bl_idle_little_driver.cpumask); +out_release_node: + of_node_put(root); return ret; }