From patchwork Thu Nov 1 07:19:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Vaittinen, Matti" X-Patchwork-Id: 10663597 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 04B6B17D5 for ; Thu, 1 Nov 2018 07:20:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D58232B9D2 for ; Thu, 1 Nov 2018 07:20:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CFAD22BA68; Thu, 1 Nov 2018 07:20:31 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 35CC72B9F2 for ; Thu, 1 Nov 2018 07:20:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lzTTL4ZauqG+LAu44m2PPBVvqGlxJ5Vj5qOLoJCVYdg=; b=gFuS+cUthFkPmx uLcgjxAu78WEOOzmvDOo8QJycgRl6M7aN4RFHfZJDxdUViAY64sM93vL4WZ2ixIQ6i0b5+bx2Ohv4 cSAMSIabxMX7UbjB1HhPeoWV8S/e6k+RY5OZ9Ru25lGyAO527MfmaJG3hsmjjt56a6nYfrthZFXIw iY86efGtQ6PxHOvT0v7OnGuwcuubVcUixe2Uvvl9gGBTxlLVeDvzoTnRhQf5RzWg/25aKootUl4UP ua2xk4NptVkYACuON5lGx3YBMgizylUzVELPV+FujEIVJtAQ0OKIeo4W9HPSrbpNSFxteXE/qlSul 2SbeC4YYBPWNWTGRz+uw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI7H9-0007NO-Au; Thu, 01 Nov 2018 07:20:19 +0000 Received: from mail-lj1-f194.google.com ([209.85.208.194]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gI7H4-000648-40 for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 07:20:17 +0000 Received: by mail-lj1-f194.google.com with SMTP id z21-v6so17170927ljz.0 for ; Thu, 01 Nov 2018 00:20:04 -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=COmn/EezDX/GWsah2t8NJRxiKg5KtxdFjJeZJYU4E4A=; b=f+L3/WHyfdJWI4RlqNs7VBbZ8YIAB5n3EvPIgTLomP0juKfsW+8TgWl7U5QGsGkGDh Vd4q7BD+u3ecGA9vxbcAHJUfkTeSvIOl6IqgcOTEyvO2SDOqgR2KvkicNs4P0qyclayT c5wJ7/ExLmkfTlKSMBgkpNQMyXjrhK4Lp2NS/xX5JuO4NrpO8sgVXud2PfdstIw1W4uw gfop9TmN6b4XgNdP9Kyuo9f2l1ZyX7aY1tFcNI0uexKk7eKNqqn7jSqRcElQ7A4l/pux hLxo9YzkS2WnVaSE2eXTasRvfEGSE7E8C5qfhzGRuDOkcGAx4NDtvoMERWvIxteKtGrB 1V3Q== X-Gm-Message-State: AGRZ1gJHdovvNd1qQqwQoMtQeMyiflBPEE1qFUssLrNKeZlLG5JOHrDd PTheulsI+4Hh/P1r5k/2I5U= X-Google-Smtp-Source: AJdET5dbBu6/6HNqM4lOnlLDkviqHw5Hcqrx59D528L/oO8JWWPh6wz73Uh4svbCjTCjKVFBg2hFlw== X-Received: by 2002:a2e:6503:: with SMTP id z3-v6mr3898709ljb.153.1541056802566; Thu, 01 Nov 2018 00:20:02 -0700 (PDT) Received: from localhost.localdomain ([213.255.186.46]) by smtp.gmail.com with ESMTPSA id s126-v6sm2524051lja.4.2018.11.01.00.20.00 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 01 Nov 2018 00:20:01 -0700 (PDT) Date: Thu, 1 Nov 2018 09:19:53 +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 Subject: [PATCH v2 4/8] clk: clk-st: avoid clkdev lookup leak at remove Message-ID: <37078c99cc7d7de6847a3bbdf0cc67fbd7281efd.1541054985.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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_002014_257549_6100418A X-CRM114-Status: GOOD ( 15.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-samsung-soc@vger.kernel.org, linux-doc@vger.kernel.org, linux-arm-msm@vger.kernel.org, matti.vaittinen@fi.rohmeurope.com, linux-kernel@vger.kernel.org, linux-soc@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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; }