Received: by 10.192.165.148 with SMTP id m20csp4171473imm; Mon, 30 Apr 2018 13:08:09 -0700 (PDT) X-Google-Smtp-Source: AB8JxZphAu4KPbSPh3GKqvBs9eCg1B4rLd9PEkRGQVj3gdCjI9uLHEM2HjKxUZEWXUfEaOWGHJ+Y X-Received: by 10.98.220.138 with SMTP id c10mr13253642pfl.183.1525118889244; Mon, 30 Apr 2018 13:08:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525118889; cv=none; d=google.com; s=arc-20160816; b=xmAxj3RGuffvSSxGXDe8KA/10fb41J7UMD/28Jg3hD7sQ+roLFGmB/nc+FP133WbgF 7tQRwW+ZfbB9iY5eS08FY1D/ZDnWaFU8Ll+BK81vQgHu4E2XYfM4YZ6NVj7ujzE8s1sX mhs9lqHvAgU5EKaMqwZZYJwrnVeFiSMRx1a2HlPtyVLg7rK8twbcXPocP1O5v21klw+4 on4Ns8QHfm2rIqQ6RumqL2NvWn2g5F/yfEDd7giEUcSuS1VNTI4KG0powh2sL0wTnxBZ n1nsFGfKoUrIRXIKQZiXEXYZvIJH55xbOTsMZ3TBNvItM+x7nHbeUDlt+3S6d0N5QM1b wCeA== 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:dmarc-filter :arc-authentication-results; bh=FZwLAbDYqnA4T4jNzRJACe8YR/hDd6p0iTVls4OxyQY=; b=aRhKHb5U2J6HeMHYWORlFXFY39/yT81qO385aIYTRvTWmPiJBsoXNczlcA0tjfqYmh AkMHzCKmOAr4VHYPYmhsGiMLZp++/rJbIjzG/6slvARC8VA7ktfFF6VXg2i05kG/m6Il 1GFfJT6r+hP2z1e42ZQT0yfOevs4UnHcGJRkDW/j7q2fplxd/fuYd/PXaj1aOeushF6G 4mUhDn5tK1y7DaJW/1Mio+JqxdjKCZa0/1ZGjERXa8tTb2tJT2O5bR/EbsaDGgrSomY+ weOVIOSC0mihp/ALPgMkQFZB3SDQqMqcf2BL1cbLqfOL1XFyixFY4of8H1616IybBH2g YXuw== 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 a1-v6si7945965plt.39.2018.04.30.13.07.25; Mon, 30 Apr 2018 13:08:09 -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 S1756149AbeD3UHL (ORCPT + 99 others); Mon, 30 Apr 2018 16:07:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:33810 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932183AbeD3T1Y (ORCPT ); Mon, 30 Apr 2018 15:27:24 -0400 Received: from localhost (unknown [104.132.1.102]) (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 69F6D22E02; Mon, 30 Apr 2018 19:27:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 69F6D22E02 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=fail smtp.mailfrom=gregkh@linuxfoundation.org From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Xidong Wang , Marc Gonzalez , Miquel Raynal , Boris Brezillon Subject: [PATCH 4.14 54/91] mtd: rawnand: tango: Fix struct clk memory leak Date: Mon, 30 Apr 2018 12:24:36 -0700 Message-Id: <20180430184007.000971626@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184004.216234025@linuxfoundation.org> References: <20180430184004.216234025@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.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Marc Gonzalez commit 007b4e8b705a4eff184d567c5a8b496622f9e116 upstream. Use devm_clk_get() to let Linux manage struct clk memory. Fixes: 6956e2385a16 ("add tango NAND flash controller support") Cc: stable@vger.kernel.org Reported-by: Xidong Wang Signed-off-by: Marc Gonzalez Reviewed-by: Miquel Raynal Signed-off-by: Boris Brezillon Signed-off-by: Greg Kroah-Hartman --- drivers/mtd/nand/tango_nand.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mtd/nand/tango_nand.c +++ b/drivers/mtd/nand/tango_nand.c @@ -654,7 +654,7 @@ static int tango_nand_probe(struct platf writel_relaxed(MODE_RAW, nfc->pbus_base + PBUS_PAD_MODE); - clk = clk_get(&pdev->dev, NULL); + clk = devm_clk_get(&pdev->dev, NULL); if (IS_ERR(clk)) return PTR_ERR(clk);