From patchwork Tue Jul 19 11:32:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: weiyj_lk@163.com X-Patchwork-Id: 9237643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 29E116075D for ; Tue, 19 Jul 2016 14:31:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1B38A27569 for ; Tue, 19 Jul 2016 14:31:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 104352766D; Tue, 19 Jul 2016 14:31:12 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C568B27569 for ; Tue, 19 Jul 2016 14:31:11 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A963B6E24D; Tue, 19 Jul 2016 14:30:35 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from m12-11.163.com (m12-11.163.com [220.181.12.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 9D90F6E678 for ; Tue, 19 Jul 2016 11:33:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version; bh=46rO4 fgoy+cqSDJYUy0HBP5fN0BncfQS19exzEC7tGo=; b=SHqSoWstOY4clRo9iGXXv txnl61NM4lxnRC96fxQOMYKBl6BF7opNgxonP8dn2rJF+HSrlwCnd9PVFtvu0cFt KqXq4JbQFic1X98bUJuJpKji8qB2Ibzapo1YK0upabELBJoh7uFWofslNsdUOH4o XkbNSQPIk0Jsoo6XUMARPs= Received: from localhost.localdomain.localdomain (unknown [180.110.255.208]) by smtp7 (Coremail) with SMTP id C8CowACXm93bD45XwauJAQ--.49284S2; Tue, 19 Jul 2016 19:32:45 +0800 (CST) From: Wei Yongjun To: Mark Yao , David Airlie , Heiko Stuebner Subject: [PATCH -next] drm/rockchip: analogix_dp: add missing clk_disable_unprepare() on error Date: Tue, 19 Jul 2016 11:32:43 +0000 Message-Id: <1468927963-2947-1-git-send-email-weiyj_lk@163.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CM-TRANSID: C8CowACXm93bD45XwauJAQ--.49284S2 X-Coremail-Antispam: 1Uf129KBjvdXoW7Wr4kKw13AFW3JF4DAFyUGFg_yoWDKFgE9w 17Xr43WF109FZ5A347Wa43G39IvwnI9F4rGF10yF4fJFnrtw45Ja4Fv3yY9ayDKr4xAFsx C3WYqr10kF1fGjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUvcSsGvfC2KfnxnUUI43ZEXa7IU01xRDUUUUU== X-Originating-IP: [180.110.255.208] X-CM-SenderInfo: pzhl5yxbonqiywtou0bp/xtbBDR2r1laDoIJR6gAAsh X-Mailman-Approved-At: Tue, 19 Jul 2016 14:30:31 +0000 Cc: linux-rockchip@lists.infradead.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Wei Yongjun Add the missing clk_disable_unprepare() before return in the error handling case. Signed-off-by: Wei Yongjun --- drivers/gpu/drm/rockchip/analogix_dp-rockchip.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c index e81e19a..89aadbf 100644 --- a/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c +++ b/drivers/gpu/drm/rockchip/analogix_dp-rockchip.c @@ -96,6 +96,7 @@ static int rockchip_dp_poweron(struct analogix_dp_plat_data *plat_data) ret = rockchip_dp_pre_init(dp); if (ret < 0) { dev_err(dp->dev, "failed to dp pre init %d\n", ret); + clk_disable_unprepare(dp->pclk); return ret; } @@ -272,6 +273,7 @@ static int rockchip_dp_init(struct rockchip_dp_device *dp) ret = rockchip_dp_pre_init(dp); if (ret < 0) { dev_err(dp->dev, "failed to pre init %d\n", ret); + clk_disable_unprepare(dp->pclk); return ret; }