Received: by 10.192.165.148 with SMTP id m20csp4152512imm; Mon, 30 Apr 2018 12:45:37 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr6IPiixoFtr9grCEYINRFcDXYRReq9pKbQILUo7ZRI7Khz9PFXH06nyWJzeEA50tB1BGDV X-Received: by 10.98.130.140 with SMTP id w134mr5435985pfd.138.1525117537789; Mon, 30 Apr 2018 12:45:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1525117537; cv=none; d=google.com; s=arc-20160816; b=orJplHJ3y3H9xN1OmalAjzythLkpWx3VuD5nG+5XAlQ9pVn2OhNd65tmkuxJtnfAEN h11lRFPAuH0V3lj9A1vZ4dHJ3/Hs7vc1L1xJR8aUe+LcPMWdbBZb8uMpv++H8IjARLlY ej8AV7BQVt7dkI3kHcWSq7IaaEc7VhNddjThiNxL5+lucicZjGmWKF/D0lHdEycGjkTN reZRC9OSPCWQxZOfscQ0knQVMPHF+C1Na5OgCB4yNrMB8RzS151N4WBeUwwYSmfTXZzs C0Dt4c2BCK8v/T3EtQB+lCOuS2BZgGsufev/PeE9uNgU3PsQ7u1lkDuzs9781R7/s0Kx SKOA== 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=Ml3UfgbBWEwLhVOkvacd6LK0bDu6MeEnD081KPLxvds=; b=Rv+eAdbYENd18KkuXR+pRlhSW8oZe3tg24DHJwFlzAJAGxIfTEbNcBTPevgJO8pqEN eAyTwOkNCr/I89SbqMN8jHpFOTQ1cS5Xp5FJ6kPx+30vr97f8xmbZVAiR8jfyO1Dm6wx SXiMF239dXCTTXFcMGb3qTio8OTam4Etr8zzvPkke4h7SbmVzHUV88nv3DY2Qo0VKkkD UOYctsRFABdzEoMYTDhyQGM7SCbTBY8H28rkM6gkcCLafxI6pbB/uO1v8P5jVVLt8pc1 lvfrYWvP2fzte1z3MEdIRwO5jdThC96EHMVhe8rQtwuTF6y0vvInHu9A1DokcHFZvZYV V/DQ== 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 h22-v6si7870480plr.207.2018.04.30.12.45.23; Mon, 30 Apr 2018 12:45:37 -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 S932371AbeD3Top (ORCPT + 99 others); Mon, 30 Apr 2018 15:44:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:36040 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932275AbeD3T2X (ORCPT ); Mon, 30 Apr 2018 15:28:23 -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 3B70022DBF; Mon, 30 Apr 2018 19:28:23 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3B70022DBF 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.16 058/113] mtd: rawnand: tango: Fix struct clk memory leak Date: Mon, 30 Apr 2018 12:24:29 -0700 Message-Id: <20180430184017.505497122@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180430184015.043892819@linuxfoundation.org> References: <20180430184015.043892819@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: 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 @@ -643,7 +643,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);