From patchwork Tue Nov 13 11:59:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10680391 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6425A139B for ; Tue, 13 Nov 2018 11:59:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4FEA629F91 for ; Tue, 13 Nov 2018 11:59:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3F98E29FA4; Tue, 13 Nov 2018 11:59:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E38CE29F3D for ; Tue, 13 Nov 2018 11:59:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729768AbeKMV52 (ORCPT ); Tue, 13 Nov 2018 16:57:28 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:39218 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726934AbeKMV52 (ORCPT ); Tue, 13 Nov 2018 16:57:28 -0500 Received: by mail-lf1-f65.google.com with SMTP id n18so8609861lfh.6; Tue, 13 Nov 2018 03:59:38 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=4fWmEQHDymzQumdk/aytbyrz8Sfb7MJtwS0fcAz0+8Q=; b=CEsl4JUt9lMKdBRXIvm4iyxlwdxdlSrsivsTOHoFyMa8/64W0U63SVdRd9JnGH2MTg DtkeV8Q1NpFJfGS2ZzpFugP3cHCEngBMkKlsXG8V5kEOmLFfZXxtbUpE/arsUFj1lTfY GbvyCbwY+ww6/2QTdylmJOGKq41xmlDfFuotyrbgmpb/zbN4kGgntQ9jpxBXX7FmXhNo FljoL2MGmbJ+dgU0j3gzhlNVX8R+bd3TkFggU40C2lhVM9S9eSo+QNA96vsPZ8YHmixU 4FjawTRmZm/FXGxgbs3ra1TDN3hSn5dDCpZ/4rdZqb4jJyC816mU67U4ljS2f6YfgVNN HK5g== X-Gm-Message-State: AGRZ1gKdo96M3Pt4tvVQqP2rnEmJiv0GvrPYwFvgTeEeOqq66OdD6gJw nSlgsfY2Wu2rZfha72hSl6U= X-Google-Smtp-Source: AJdET5eY5Y8Z+Wd+y8qQgdrwaMKb79bzHHDnnpRZ/qJOEzRVVyE3QH6UbsC9cFbqs3Ab3FvcXvg1Fg== X-Received: by 2002:a19:d5:: with SMTP id 204mr2618716lfa.116.1542110377098; Tue, 13 Nov 2018 03:59:37 -0800 (PST) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id g73-v6sm3518209lje.24.2018.11.13.03.59.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 13 Nov 2018 03:59:36 -0800 (PST) Date: Tue, 13 Nov 2018 13:59:27 +0200 From: Matti Vaittinen To: mazziesaccount@gmail.com Cc: Jonathan Corbet , Michael Turquette , Stephen Boyd , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Russell King , Andy Gross , David Brown , Andrey Smirnov , Guenter Roeck , Rob Herring , Sebastian Reichel , Lee Jones , Huang Shijie , Matti Vaittinen , Daniel Kurtz , Akshu Agrawal , "Rafael J. Wysocki" , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org Subject: [PATCH v4 3/8] clk: clk-st: avoid clkdev lookup leak at remove Message-ID: References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Use devm based clkdev lookup registration to avoid leaking lookup structures. Signed-off-by: Matti Vaittinen --- drivers/clk/x86/clk-st.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/x86/clk-st.c b/drivers/clk/x86/clk-st.c index 3a0996f2d556..25d4b97aff9b 100644 --- a/drivers/clk/x86/clk-st.c +++ b/drivers/clk/x86/clk-st.c @@ -52,7 +52,8 @@ static int st_clk_probe(struct platform_device *pdev) 0, st_data->base + MISCCLKCNTL1, OSCCLKENB, CLK_GATE_SET_TO_DISABLE, NULL); - clk_hw_register_clkdev(hws[ST_CLK_GATE], "oscout1", NULL); + devm_clk_hw_register_clkdev(&pdev->dev, hws[ST_CLK_GATE], "oscout1", + NULL); return 0; }