From patchwork Wed Sep 19 11:42:32 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 1476971 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by patchwork2.kernel.org (Postfix) with ESMTP id 3684FDF280 for ; Wed, 19 Sep 2012 11:44:43 +0000 (UTC) Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1TEIfy-0003q7-Vx; Wed, 19 Sep 2012 11:42:43 +0000 Received: from opensource.wolfsonmicro.com ([80.75.67.52]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1TEIfv-0003pa-A4 for linux-arm-kernel@lists.infradead.org; Wed, 19 Sep 2012 11:42:40 +0000 Received: from finisterre.wolfsonmicro.main (unknown [216.16.224.186]) by opensource.wolfsonmicro.com (Postfix) with ESMTPSA id 306C811005A; Wed, 19 Sep 2012 12:42:36 +0100 (BST) Received: from broonie by finisterre.wolfsonmicro.main with local (Exim 4.80) (envelope-from ) id 1TEIfp-000450-W6; Wed, 19 Sep 2012 07:42:34 -0400 From: Mark Brown To: Russell King Subject: [PATCH] clk: Fix release in devm_clk_put() Date: Wed, 19 Sep 2012 07:42:32 -0400 Message-Id: <1348054952-15652-1-git-send-email-broonie@opensource.wolfsonmicro.com> X-Mailer: git-send-email 1.7.10.4 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.6 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: Mark Brown , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org Surprisingly devres_destroy() doesn't call the destructor for the resource it is destroying, use the newly added devres_release() instead to fix this. Signed-off-by: Mark Brown --- Rebased on top of the creation of clk-devres.c. It appears this also got silently dropped by the patch system :/ drivers/clk/clk-devres.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk-devres.c b/drivers/clk/clk-devres.c index f1e7a83..8f57154 100644 --- a/drivers/clk/clk-devres.c +++ b/drivers/clk/clk-devres.c @@ -48,7 +48,7 @@ void devm_clk_put(struct device *dev, struct clk *clk) { int ret; - ret = devres_destroy(dev, devm_clk_release, devm_clk_match, clk); + ret = devres_release(dev, devm_clk_release, devm_clk_match, clk); WARN_ON(ret); }