From patchwork Sun Mar 1 07:43:35 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yoshinori Sato X-Patchwork-Id: 5907231 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 84247BF440 for ; Sun, 1 Mar 2015 07:47:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BA93F203A0 for ; Sun, 1 Mar 2015 07:47:16 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9856220398 for ; Sun, 1 Mar 2015 07:47:15 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YRyYY-0005Wu-Dz; Sun, 01 Mar 2015 07:44:54 +0000 Received: from mail1.asahi-net.or.jp ([202.224.39.197]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YRyYU-0005V6-Ls for linux-arm-kernel@lists.infradead.org; Sun, 01 Mar 2015 07:44:51 +0000 Received: from sa76r4 (y081184.ppp.asahi-net.or.jp [118.243.81.184]) by mail1.asahi-net.or.jp (Postfix) with ESMTP id 585B8DF73; Sun, 1 Mar 2015 16:44:17 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by sa76r4 (Postfix) with ESMTP id BE255D2E5; Sun, 1 Mar 2015 16:44:17 +0900 (JST) X-Virus-Scanned: Debian amavisd-new at sa76r4.localdomain Received: from sa76r4 ([127.0.0.1]) by localhost (sa76r4.localdomain [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XUZEFVOv2k1n; Sun, 1 Mar 2015 16:44:17 +0900 (JST) Received: by sa76r4 (Postfix, from userid 1000) id A4214D4FB; Sun, 1 Mar 2015 16:44:17 +0900 (JST) From: Yoshinori Sato To: Russell King Subject: [PATCH] clkdev: clk_add_alias don't put origin clock Date: Sun, 1 Mar 2015 16:43:35 +0900 Message-Id: <1425195815-14895-1-git-send-email-ysato@users.sourceforge.jp> X-Mailer: git-send-email 2.1.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150228_234450_829995_6A2B2440 X-CRM114-Status: UNSURE ( 8.32 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 1.0 (+) Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Yoshinori Sato X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Refer to 'r' later. So don't put in clk_add_alias. Signed-off-by: Yoshinori Sato --- drivers/clk/clkdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clkdev.c b/drivers/clk/clkdev.c index 043fd36..fddb999 100644 --- a/drivers/clk/clkdev.c +++ b/drivers/clk/clkdev.c @@ -318,7 +318,6 @@ int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, return PTR_ERR(r); l = clkdev_alloc(r, alias, alias_dev_name); - clk_put(r); if (!l) return -ENODEV; clkdev_add(l); @@ -334,6 +333,7 @@ void clkdev_drop(struct clk_lookup *cl) mutex_lock(&clocks_mutex); list_del(&cl->node); mutex_unlock(&clocks_mutex); + clk_put(cl->clk); kfree(cl); } EXPORT_SYMBOL(clkdev_drop);