Received: by 2002:a25:2c96:0:0:0:0:0 with SMTP id s144csp83850ybs; Sat, 23 May 2020 22:08:12 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTIloV1IKlolYEVXIjW/dFAwtPpkcPBmRvXyjyiIsXGlFK6d9jPutravkSM9qagX/vpa7F X-Received: by 2002:a17:906:a415:: with SMTP id l21mr14698710ejz.100.1590296892380; Sat, 23 May 2020 22:08:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590296892; cv=none; d=google.com; s=arc-20160816; b=IOBv7/LAqxZlGVoqERef9MJGVmHMNAuLVGcWxa233SUobBtWhrQ0Qe7HwtlxDs5fro ZV53JYgtFLhm5gfaoyMP+HFe/7CpvvIjBRP0j4epYmk++criHZ8S/FQgKdzVlY8ALjHI IVRrVqhndoUmJXR5wL4cD5YR7+wM4hNijVaCr4pFULzU9mbgFYRAIsxEaSdjYhn5POw8 W/K4jqbv/yhdiW4gK6jOUY6KAKTQS4eZTbEaYoXnkdihR6ebYBf2W6UTrBm7uiZGi65T h83P5WgPSTcFCCdl/CoO24w7xEAuFoNasvhPScgCi3rp9UomKIwz6v3HSNUvUj9cLjXb Va7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=yOIx32DzV9Yk/O3q4NLhph8Gyjxz3HGsJqmaZP5BXsg=; b=Krm2B6Kp8KWLT3xvsNybh7WtxspFhGUQa95X5C6F7khZ/3ZzGzsFgofDzGm0VQ/0uH Q3jmlbr0RHtD91lNlOlJlBQA/tme2ZAmykJr+JyzCPV8OKbhQPOALvur9lciWdqwAurv QJEIrKslrTx6fKO/ViUTTwAzjuBEA9tAYlZxO3aFKzaHtqtRqU0iE+LtDGohKYRzRTv7 cCac0T3r5Ur6I2qB+Y+DbxytJkI6qVoi4oUfrRJpaOKxn3eiCeBJ5x8/sOpwIQiWcTn5 9zgyyweLp+DtsLYBkaOiLc0w1AzWUaRgg/RwVEK3usXTZ+yWybnKUQ0cTUPMdNGkqMIj TbyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h0X98o+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h17si7296059ejk.369.2020.05.23.22.07.42; Sat, 23 May 2020 22:08:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=h0X98o+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727872AbgEXFFk (ORCPT + 99 others); Sun, 24 May 2020 01:05:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725805AbgEXFFk (ORCPT ); Sun, 24 May 2020 01:05:40 -0400 Received: from mail-wm1-x342.google.com (mail-wm1-x342.google.com [IPv6:2a00:1450:4864:20::342]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F080CC061A0E for ; Sat, 23 May 2020 22:05:39 -0700 (PDT) Received: by mail-wm1-x342.google.com with SMTP id h4so12425800wmb.4 for ; Sat, 23 May 2020 22:05:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=yOIx32DzV9Yk/O3q4NLhph8Gyjxz3HGsJqmaZP5BXsg=; b=h0X98o+dRzjFWkvGg+RVmrUh81Ek8j36zAZtYtaLmx/I5qzSvxxpXToFKCvDnAmiwt 4a8QEoW1hYjKF7mQxdP//+r98T0Saps4B16lcvA/xxDRC4tmjNyrddvVD21yllEM4WPX SA9Mh/jDUtVXRs8uN54riWl0nZGpRNVlApCSIXVIwlhmkGkRRN+zSxSSxHqHVANheISQ J42Wjgo0n/l6BipOl8pqdgbkAiglrtQso5igL+bn5ZS2Z1QYMNt9ZsLIemb6cZXoEMNc 7QBoiRd2LMPeZmy+iu+2ZlnE6AKP4D87/XyLuRLPlN1K1KiXfEZX1iaEcHbtOUuvLYAi yrhA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=yOIx32DzV9Yk/O3q4NLhph8Gyjxz3HGsJqmaZP5BXsg=; b=t/EmrW8swloAD3GiA4POt4TTLOwdarbgUvguLMDmz24yfJoSFj40XteWNjlEHK4ljz PGJWjvWthKjWQ8t6R1p6Y60xOiCbnUYdy39C9GOAsWSyWQw09uEAfS/EsZJ0/nStV2T9 Ga86fbIn2jzj6xNIOlkgquDPKzzeY4iDGQJYahnEfNfFskm6DO5b+poTecyY9+s7VRsK SVzseBDopdnW0G8D68aExKbPay/WoARQz1ftGJa7qV620rEIK6Fr2Sdd+YeUzUVVxis1 AuolFiVMyXD5fJtuKNhz9AwR348rQYC6ClM2LMwMVG9pCMwstThkU0UItuaBUXMwyhrH n7dQ== X-Gm-Message-State: AOAM530hfbjws3wR8sHtCW1oQqH2YME1yvE0iM4cMBbLOA5IrpginhTd FCGI9tob3dZ/FjF06IKfRrPi8A== X-Received: by 2002:a1c:27c2:: with SMTP id n185mr21596506wmn.68.1590296738569; Sat, 23 May 2020 22:05:38 -0700 (PDT) Received: from ?IPv6:2a01:e34:ed2f:f020:c871:e070:f68d:a4f7? ([2a01:e34:ed2f:f020:c871:e070:f68d:a4f7]) by smtp.googlemail.com with ESMTPSA id h1sm14766532wme.42.2020.05.23.22.05.37 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 23 May 2020 22:05:37 -0700 (PDT) Subject: Re: [PATCH V3] thermal: imx: Add missing of_node_put() To: Anson Huang , "rui.zhang@intel.com" , "amit.kucheria@verdurent.com" , "shawnguo@kernel.org" , "s.hauer@pengutronix.de" , "kernel@pengutronix.de" , "festevam@gmail.com" , "linux-pm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Cc: dl-linux-imx References: <1588128570-12917-1-git-send-email-Anson.Huang@nxp.com> From: Daniel Lezcano Message-ID: Date: Sun, 24 May 2020 07:05:37 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 24/05/2020 05:26, Anson Huang wrote: > Gentle ping... It is applied, sorry for not letting you know. >> Subject: [PATCH V3] thermal: imx: Add missing of_node_put() >> >> After finishing using cpu node got from of_get_cpu_node(), of_node_put() >> needs to be called, the cpufreq policy also needs to be put unconditionally. >> >> Signed-off-by: Anson Huang >> --- >> Changes since V2: >> - call cpufreq_cpu_put() unconditionally after cooling register done. >> --- >> drivers/thermal/imx_thermal.c | 13 ++++++------- >> 1 file changed, 6 insertions(+), 7 deletions(-) >> >> diff --git a/drivers/thermal/imx_thermal.c b/drivers/thermal/imx_thermal.c >> index e761c9b..8764cb5 100644 >> --- a/drivers/thermal/imx_thermal.c >> +++ b/drivers/thermal/imx_thermal.c >> @@ -649,7 +649,7 @@ MODULE_DEVICE_TABLE(of, of_imx_thermal_match); >> static int imx_thermal_register_legacy_cooling(struct imx_thermal_data *data) >> { >> struct device_node *np; >> - int ret; >> + int ret = 0; >> >> data->policy = cpufreq_cpu_get(0); >> if (!data->policy) { >> @@ -661,20 +661,19 @@ static int >> imx_thermal_register_legacy_cooling(struct imx_thermal_data *data) >> >> if (!np || !of_find_property(np, "#cooling-cells", NULL)) { >> data->cdev = cpufreq_cooling_register(data->policy); >> - if (IS_ERR(data->cdev)) { >> + if (IS_ERR(data->cdev)) >> ret = PTR_ERR(data->cdev); >> - cpufreq_cpu_put(data->policy); >> - return ret; >> - } >> } >> >> - return 0; >> + cpufreq_cpu_put(data->policy); >> + of_node_put(np); >> + >> + return ret; >> } >> >> static void imx_thermal_unregister_legacy_cooling(struct imx_thermal_data >> *data) { >> cpufreq_cooling_unregister(data->cdev); >> - cpufreq_cpu_put(data->policy); >> } >> >> #else >> -- >> 2.7.4 > -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog