From patchwork Fri Nov 2 12:36:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10665415 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 23C1514E2 for ; Fri, 2 Nov 2018 12:36:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0FD3B2B3C2 for ; Fri, 2 Nov 2018 12:36:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0308C2B3D6; Fri, 2 Nov 2018 12:36:40 +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=unavailable 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 AE24B2B3C2 for ; Fri, 2 Nov 2018 12:36:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727514AbeKBVni (ORCPT ); Fri, 2 Nov 2018 17:43:38 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:39518 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726026AbeKBVni (ORCPT ); Fri, 2 Nov 2018 17:43:38 -0400 Received: by mail-lf1-f67.google.com with SMTP id n18so1215628lfh.6; Fri, 02 Nov 2018 05:36:33 -0700 (PDT) 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=XHBuXIz+/k/o9sHwadx6Xj4e5igjCAket6IT5Fa5bu0=; b=F2C8pG9shyle2xQWJdlcVNYU8Ry0BME+nJgb4y11H6UlAaItLV+MqxVVOgxKDZ86bI 3ULMxNX1WRBtUSfKu/VhMpf/UXf+tu4uteErgkx4PZLqHYPscQfRLyWzjVpsjV8V6+B1 +y35Nfw+K9+iqroWZ/YdHH/5PGnvdjDnrvlCZH2h6Sx7/sUM4MzlBfY528yUBE+8Cde/ uUyce7uTUtT9RV1foeyt6iwqKeeZC95qY+BqHZ98oYbFFfn2DhHyomg5XdQdLn6KjUoi RPxOCKYDpAcH1iOQ5o7hw2RhgUot5ARw/MXnnT+dAsX85hpw8e812ioFBqsjhgB+V9OS nKNw== X-Gm-Message-State: AGRZ1gI3WjZ4F51BO7w6tU6nQjJkKpEnBm5KSePI8tce7Mz0WZjgfE11 OBl2LaLRk++je/ZA2MMaIUI= X-Google-Smtp-Source: AJdET5f98WmhOgjNCCnLbQqOo8CLgXCsjGIuZLUhIOODJZO3xhN5eWHpj2rx7Fh8LSIu5G+mG87uzw== X-Received: by 2002:a19:d04f:: with SMTP id h76mr6541421lfg.52.1541162193044; Fri, 02 Nov 2018 05:36:33 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id t77-v6sm5708146lfi.63.2018.11.02.05.36.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 02 Nov 2018 05:36:32 -0700 (PDT) Date: Fri, 2 Nov 2018 14:36:20 +0200 From: Matti Vaittinen To: Jonathan Corbet , Michael Turquette , Stephen Boyd , Chanwoo Choi , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Russell King , Andy Gross , David Brown , Kukjin Kim , Sylwester Nawrocki , Tomasz Figa , Andrey Smirnov , Sebastian Reichel , Guenter Roeck , Rob Herring , Matti Vaittinen , Huang Shijie , Akshu Agrawal , "Rafael J. Wysocki" , Daniel Kurtz , mazziesaccount@gmail.com Cc: 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, linux-samsung-soc@vger.kernel.org, matti.vaittinen@fi.rohmeurope.com Subject: [PATCH v3 3/7] clk: clk-st: avoid clkdev lookup leak at remove Message-ID: <5f79250d8055016b3a3c815e478ece889b8f80d2.1541161503.git.matti.vaittinen@fi.rohmeurope.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@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 fb62f3938008..32d8df9bd853 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; }