From patchwork Tue Oct 17 10:16:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeffy Chen X-Patchwork-Id: 10011615 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 05314600CC for ; Tue, 17 Oct 2017 10:25:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E96DC2882F for ; Tue, 17 Oct 2017 10:25:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE5132883E; Tue, 17 Oct 2017 10:25:19 +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.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 6FB8E2882F for ; Tue, 17 Oct 2017 10:25:19 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=V5hyh3mckg3vOty5DbI3F+R4MBkrFGF+QMA30TsughY=; b=ERlH1l0kUSWiS0Z39gFI43X6Lz 5yc8rd5V1XButaeGCCPXAwXlpmt9AVfdpZKixc8cPfMuDbRYk4BBCuEnMCgyKhSjkNEOiy6P9a6mp kPEYqbtuqs95nxYQuqhMGtYXuW/mtVJ0HOYxEKe9dR3lbU2u5DfTauHcO/PFaM1O0GzQ0SFlK+TE+ vx+B6iopQJGG2Q8HpjRi9nd9oe+ukqHVm8ZLSd2iNKtubP+uq1LHpmja2Euisgh18GYzt4VFfw9/h Nj9AygGrLxkJt3CU2usOTIZObcTyqKyYxHOTaNHg7x7ISSa+rdijVZJpBR/qc0sL3nzICbZV3P/CM xs5MJbZA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1e4P3Q-0002bd-2D; Tue, 17 Oct 2017 10:24:56 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e4P2w-0001gX-Ow; Tue, 17 Oct 2017 10:24:26 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=hwF5ZW8XSptDdx6pQH+NymcxAvYW/EHnvQcSiZ/amCo=; b=UCFcIA4WU2/9WlLYGUn8d7o9b VxIodz9ik3t40+OJ7cip4UReCwX+weWonS1jqrA+jnhf4a54xiLLbOjofGDC4CEeBarfA6xQlwWC+ RhL6n/eRpze1J9lFSIuUojn3502qm/lMttbbuX+rVBWIRVq6J2MWLVgq/UhVh8qKPZe8wZDJLdTge AzKzp10EdivU7ZQXsKXaJa94Ao2pff/cmT8SKizbBYmTyJU61pVqAxh6a7neRHHCvyIdp6nkqNI1D xv6tlfHPTSWU1I8rLTnwB42AKb3BoqkJDrBzeXhri7O0LF0q3MtEWiSZ3Nrf+UsepHdRqX9LPZYxB mQnySQtrg==; Received: from regular1.263xmail.com ([211.150.99.141]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1e4Own-0005Wc-HT; Tue, 17 Oct 2017 10:18:10 +0000 Received: from jeffy.chen?rock-chips.com (unknown [192.168.167.235]) by regular1.263xmail.com (Postfix) with ESMTP id 00707A0; Tue, 17 Oct 2017 18:16:57 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 0 X-MAIL-DELIVERY: 1 X-KSVirus-check: 0 X-ABS-CHECKED: 4 Received: from localhost (localhost [127.0.0.1]) by smtp.263.net (Postfix) with ESMTPA id 9F4FD3C4; Tue, 17 Oct 2017 18:16:54 +0800 (CST) X-RL-SENDER: jeffy.chen@rock-chips.com X-FST-TO: linux-kernel@vger.kernel.org X-SENDER-IP: 103.29.142.67 X-LOGIN-NAME: jeffy.chen@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: cjf@rock-chips.com X-DNS-TYPE: 0 Received: from localhost (unknown [103.29.142.67]) by smtp.263.net (Postfix) whith ESMTP id 22199FSG1F; Tue, 17 Oct 2017 18:16:58 +0800 (CST) From: Jeffy Chen To: linux-kernel@vger.kernel.org Subject: [RFC PATCH v4 4/8] drm/rockchip: dw_hdmi: Fix error handling path Date: Tue, 17 Oct 2017 18:16:20 +0800 Message-Id: <20171017101624.12506-5-jeffy.chen@rock-chips.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171017101624.12506-1-jeffy.chen@rock-chips.com> References: <20171017101624.12506-1-jeffy.chen@rock-chips.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171017_111808_277665_AE106253 X-CRM114-Status: UNSURE ( 9.60 ) X-CRM114-Notice: Please train this message. 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: dmitry.torokhov@gmail.com, heiko@sntech.de, David Airlie , briannorris@chromium.org, rjw@rjwysocki.net, dianders@chromium.org, dri-devel@lists.freedesktop.org, tfiga@chromium.org, linux-rockchip@lists.infradead.org, Jeffy Chen , broonie@kernel.org, seanpaul@chromium.org, linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 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 Add missing clk_disable_unprepare() in bind()'s error handling path. Fixes: 12b9f204e804 ("drm: bridge/dw_hdmi: add rockchip rk3288 support") Signed-off-by: Jeffy Chen --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index 1eb02a82fd91..582283da7861 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -383,8 +383,10 @@ static int dw_hdmi_rockchip_bind(struct device *dev, struct device *master, * If dw_hdmi_bind() fails we'll never call dw_hdmi_unbind(), * which would have called the encoder cleanup. Do it manually. */ - if (ret) + if (ret) { drm_encoder_cleanup(encoder); + clk_disable_unprepare(hdmi->vpll_clk); + } return ret; }