Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp3396263ybp; Sun, 6 Oct 2019 11:01:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHSnehBwctBZexMIb+jtjK7h65if57RfnBYTO1NFRdiJNn/y66EIqMyekAsQKrFhZJJJ5e X-Received: by 2002:a17:906:2a86:: with SMTP id l6mr7855976eje.120.1570384894640; Sun, 06 Oct 2019 11:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570384894; cv=none; d=google.com; s=arc-20160816; b=s4KME3E8R6jGDnu8ER2W9IyN7ubM3mmT9CwN8WMFSl0vhM5+mQ2ezRSsC2qP+szskg BPE6yJCEtIXFDYqhU81tMDqlAM0G4rQRorc+t9/eW+yqLsBSp2V/i6C85GwEeRMeyaXq 1JGs3Nz+pYAmW+ith1kPtrtgZBZXDwUpksk9S9g4NOFoQWeLkhepUssHD2yElnnnfxvp psQXvuP4Megoxst4rGqYNX+gTb5+YVXZ5JwbUBTuoA8Qcy9wpV3OyvfxBOYHhwFQYYqt x+szjg3vHLBt7GsLSEe7KL/ZUf61Ig8FbHIg8z1LjB+azMJKEMNTjQ6Qe/zuYMAYwP1q Y59A== 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:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=3GhOujs7E8eNLLPZl8VwH5N4YCOemKSuH4fDbwLgc10=; b=wM/FYI8wS1cJMnfr4++ghTFYFBTdF0bIKJKdgsLV7rl7LTIclJt6tgv5DK81uUD+wb 4dKFTZovU0hMygszv97RcROJ+ZAAbcH1LJ3+g9SNiywJJJfgIf9uncO4ARXNREvUb72u Yx7mfKPqbYnAY0ggurTPVwFhF4caV0uQ2QIISoWPwMK+G+OUJgbADH4/rHRKjr92L98s vsTj4Q3RhQ8Bdzop6HNYcJwziAt7TZaukLAnjQhM1GtqkReDhncLWa6CA+cj+Sr2+y1o w0Gy2rq1EbyHSWT5TWTtrCVPu3eUkaNyRT6pVoM6oiUMgHZYR3lcIFeRyU5Cs1BtpmDu C/sg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XGMzrf+Q; 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 bt6si7105528edb.69.2019.10.06.11.01.11; Sun, 06 Oct 2019 11:01:34 -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; dkim=pass header.i=@kernel.org header.s=default header.b=XGMzrf+Q; 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 S1728857AbfJFR6q (ORCPT + 99 others); Sun, 6 Oct 2019 13:58:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:58010 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729460AbfJFRbn (ORCPT ); Sun, 6 Oct 2019 13:31:43 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 748C92133F; Sun, 6 Oct 2019 17:31:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570383103; bh=RWaQefVK8ASVG6pbqzbUIqMWiTGMpl6fvlxtzPjJeq0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XGMzrf+QwPoBbqyEAyNWT7R0ZN1yPdTB1je6RIt69uYTSCnTIKvmThtUdS+6OR4gv 85PlgqFaC92oiZJSE5G1YnkQRDY1IKH1/PjCqt6wah1Vaw7PW/X05J59UYpClG2+aW 46uIhRiHzIsSrT2/X3O6Q/hlFjH0A1820PtHIUWI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Chunyan Zhang , Chunyan Zhang , Stephen Boyd , Sasha Levin Subject: [PATCH 4.19 044/106] clk: sprd: add missing kfree Date: Sun, 6 Oct 2019 19:20:50 +0200 Message-Id: <20191006171142.943793763@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191006171124.641144086@linuxfoundation.org> References: <20191006171124.641144086@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Chunyan Zhang [ Upstream commit 5e75ea9c67433a065b0e8595ad3c91c7c0ca0d2d ] The number of config registers for different pll clocks probably are not same, so we have to use malloc, and should free the memory before return. Fixes: 3e37b005580b ("clk: sprd: add adjustable pll support") Signed-off-by: Chunyan Zhang Signed-off-by: Chunyan Zhang Link: https://lkml.kernel.org/r/20190905103009.27166-1-zhang.lyra@gmail.com Signed-off-by: Stephen Boyd Signed-off-by: Sasha Levin --- drivers/clk/sprd/pll.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/clk/sprd/pll.c b/drivers/clk/sprd/pll.c index 36b4402bf09e3..640270f51aa56 100644 --- a/drivers/clk/sprd/pll.c +++ b/drivers/clk/sprd/pll.c @@ -136,6 +136,7 @@ static unsigned long _sprd_pll_recalc_rate(const struct sprd_pll *pll, k2 + refin * nint * CLK_PLL_1M; } + kfree(cfg); return rate; } @@ -222,6 +223,7 @@ static int _sprd_pll_set_rate(const struct sprd_pll *pll, if (!ret) udelay(pll->udelay); + kfree(cfg); return ret; } -- 2.20.1