Received: by 10.192.165.148 with SMTP id m20csp2546993imm; Sun, 22 Apr 2018 09:17:49 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+nOsmW8Nhtu1243uYnJVLrhi4LcS5f3rYIWd+SlG8XDQBxVkARVOgnXWPkRm+3xUIw7QI7 X-Received: by 2002:a17:902:4003:: with SMTP id b3-v6mr17437547pld.15.1524413869630; Sun, 22 Apr 2018 09:17:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524413869; cv=none; d=google.com; s=arc-20160816; b=BEj1TyxV0trE0Lrm10/stQkyTP0Z0GauJ5jHo/qTVW9Pb5+Ucvt7t36Nlc8RVDjgiT 8nUKd2O35KKKCXOORNNTsnMVFnRbs8P4gIhFxSkr2dJjAj7IEYtLlF/VIFFxw0kiV9sv F1ZYodgQCNMV8k8cSAs2sMsDK/gs5//51g651WpvXZw4smvK48SxafgoJ93B7jkqPV7/ wi8iySXrwayY6io2VTddnzpJNDGFQeY6PcyOo2ugjESLQKFYjWOcPljMbUhn3p0tMgpk hLquO1E+x2crKTjhJcl5nmLz8ZcJWyeHiXIuAjcD083EZW4FIhOEK1XAfp8somzwhoM1 nYIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=mcThcBYR/LMwNXUE6eCqF6hrZ3u9NF/8yKlGdS/DRek=; b=PayP2j/12IiRKs5gBJQN24W6CTln02+0lU7xoXyL+ZIvMrx9MAX6kLxtAvzdh827HI y6yycdHZw471hF6ORJTSVvpbfs9YH0gR6agYw82Z553pyi55sE9Ue1h0dXMq6pmeBHV3 NXRq4oqaNVr7fXJ/fSa/R0AFfymXwb1zxuTXvkIzl4BRQtewdcXwaQdBXo77MKsq6vhh drZKM81BuPMbpYnV4pF4OenrApeeVADNtnJ+1y6XrAmJ830d+zXbJJNJ8Yy5PkI3YA8i kcd5EBLgN/gy3jAkEdc65uymjF0/Wq6G1cw/xPzotz5R2Tzb+r0+7NQ3m7r2zKdzWC9I 9L5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s21si9901873pfi.87.2018.04.22.09.17.35; Sun, 22 Apr 2018 09:17:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753848AbeDVQQb (ORCPT + 99 others); Sun, 22 Apr 2018 12:16:31 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:44274 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752353AbeDVNyp (ORCPT ); Sun, 22 Apr 2018 09:54:45 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id D99ED710; Sun, 22 Apr 2018 13:54:44 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Thomas Petazzoni , Gregory CLEMENT , Viresh Kumar , "Rafael J. Wysocki" Subject: [PATCH 4.16 003/196] cpufreq: armada-37xx: Fix clock leak Date: Sun, 22 Apr 2018 15:50:23 +0200 Message-Id: <20180422135104.416677467@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180422135104.278511750@linuxfoundation.org> References: <20180422135104.278511750@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.16-stable review patch. If anyone has any objections, please let me know. ------------------ From: Gregory CLEMENT commit bbcc328561040292f7d6796954d478e4a2335e6f upstream. There was no clk_put() balancing the clk_get(). This commit fixes it. Fixes: 92ce45fb875d (cpufreq: Add DVFS support for Armada 37xx) Cc: 4.16+ # 4.16+ Reported-by: Thomas Petazzoni Signed-off-by: Gregory CLEMENT Acked-by: Viresh Kumar Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/cpufreq/armada-37xx-cpufreq.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/cpufreq/armada-37xx-cpufreq.c +++ b/drivers/cpufreq/armada-37xx-cpufreq.c @@ -202,6 +202,7 @@ static int __init armada37xx_cpufreq_dri cur_frequency = clk_get_rate(clk); if (!cur_frequency) { dev_err(cpu_dev, "Failed to get clock rate for CPU\n"); + clk_put(clk); return -EINVAL; } @@ -210,6 +211,7 @@ static int __init armada37xx_cpufreq_dri return -EINVAL; armada37xx_cpufreq_dvfs_setup(nb_pm_base, clk, dvfs->divider); + clk_put(clk); for (load_lvl = ARMADA_37XX_DVFS_LOAD_0; load_lvl < LOAD_LEVEL_NR; load_lvl++) {