Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3693653pxb; Mon, 24 Jan 2022 15:33:17 -0800 (PST) X-Google-Smtp-Source: ABdhPJw1QfR/xgxadprHENTKHgHDfs0CEzbveo4R/MQsN7jZFimNmsU4Bt+VJIe2wr5mFFo3GvK0 X-Received: by 2002:a17:903:41c8:b0:14a:4dc5:ebbb with SMTP id u8-20020a17090341c800b0014a4dc5ebbbmr16075857ple.36.1643067196904; Mon, 24 Jan 2022 15:33:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643067196; cv=none; d=google.com; s=arc-20160816; b=yTvp+4sUHoVKPZKjLQz+Riq2qqu425GlG849DP74uc7RURUzf2X2xqTgK5Qku8pCCa 5fOauKjN+8VdgUSZzfj7c9/7nwrR5WTze1ZscQUkhLdgh/OorwctCk1MGXD27+ZIvt6k FH+YH6k9vOtb1i9srCtJ8hCkuQIGnDkokaJn8cMuC9kyR+9skWOmOPyVSL5hrjF2BBGk cETvbd9hxFv6/1+M2TvN8N7Ouw2pVh+UreT4CFczc7fNGNlk/MQyJTFYH79Yx1GiCaI8 4pI9FHWmBmuMxFHzoXIakKRI63anLalyq2IvjF6sAqb3BOWQyh32G8y3wI3bsr0PBl1M Vv1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=x85MTDBLSvjaRT33EPxHVMNYcCfdunO3f37S7YpYOAs=; b=ec6drJ+sNpiuH8nyeUqFBT6TgaW65/y0yMOdPVsufxx7icV/L7D+bQYEDqkC0BbZzv tDm0hOOZJ5GrcSWEMhXjSqBjhPoSObrWdr9dHlwyL3HEi5yApNszxjD4NqW+iN2OvlIO XOx+qYMN1Q36GAj5ahmIrA2pyzQL8n1fBGmmarYIuZXmDt8g564cL+I/nJb53h0uYC7U NSKzx+oVV5cjb6ZWEMEzU9C9BUriYvQLJ8RdNt5B2x27SSnaBE/+x7hbqycyA3uNqxd9 ZwGhc81ysOBJqCR58w4l09zsqZQMk2fRpynfYJgQZhPEtVMbRgyriBl0FFJmYtm7TfqX rFaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=haeXDcV8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c5si597193pjd.34.2022.01.24.15.33.04; Mon, 24 Jan 2022 15:33:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=haeXDcV8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1849933AbiAXX1A (ORCPT + 99 others); Mon, 24 Jan 2022 18:27:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41000 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1835200AbiAXWfs (ORCPT ); Mon, 24 Jan 2022 17:35:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07A0FC0E9B93; Mon, 24 Jan 2022 12:58:49 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id C29B3B811FB; Mon, 24 Jan 2022 20:58:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F37A5C340E7; Mon, 24 Jan 2022 20:58:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643057926; bh=LLm+7HyVW08h6eIjjhLxlVIBpY/j4cIwzuM3+dTSeIY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=haeXDcV8kJuzgTKWXKn/xE7BmcrS8wVV0EJ3WWo7B13zWzn8ERsTXDB/ChbvwhHIq oKq3uMCu2myb+cCwwHIwjf+jwWDT2+7Qdq5FEQLpUdwBk3n0aR/gLXb1PGDbvHKyiz j42Hh/yba49JaB+olro96kwhVHLcHT9ycMz2Qtk4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Brian Norris , Chen-Yu Tsai , "=?UTF-8?q?N=C3=ADcolas=20F . =20R . =20A . =20Prado?=" , Heiko Stuebner , Sasha Levin Subject: [PATCH 5.16 0091/1039] drm/rockchip: dsi: Disable PLL clock on bind error Date: Mon, 24 Jan 2022 19:31:20 +0100 Message-Id: <20220124184128.218939986@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184125.121143506@linuxfoundation.org> References: <20220124184125.121143506@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Brian Norris [ Upstream commit 5a614570172e1c9f59035d259dd735acd4f1c01b ] Fix some error handling here noticed in review of other changes. Fixes: 2d4f7bdafd70 ("drm/rockchip: dsi: migrate to use dw-mipi-dsi bridge driver") Signed-off-by: Brian Norris Reported-by: Chen-Yu Tsai Reviewed-by: Chen-Yu Tsai Tested-by: NĂ­colas F. R. A. Prado Signed-off-by: Heiko Stuebner Link: https://patchwork.freedesktop.org/patch/msgid/20210928143413.v3.4.I8bb7a91ecc411d56bc155763faa15f289d7fc074@changeid Signed-off-by: Sasha Levin --- drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -944,7 +944,7 @@ static int dw_mipi_dsi_rockchip_bind(str ret = clk_prepare_enable(dsi->grf_clk); if (ret) { DRM_DEV_ERROR(dsi->dev, "Failed to enable grf_clk: %d\n", ret); - goto out_pm_runtime; + goto out_pll_clk; } dw_mipi_dsi_rockchip_config(dsi); @@ -956,19 +956,21 @@ static int dw_mipi_dsi_rockchip_bind(str ret = rockchip_dsi_drm_create_encoder(dsi, drm_dev); if (ret) { DRM_DEV_ERROR(dev, "Failed to create drm encoder\n"); - goto out_pm_runtime; + goto out_pll_clk; } ret = dw_mipi_dsi_bind(dsi->dmd, &dsi->encoder); if (ret) { DRM_DEV_ERROR(dev, "Failed to bind: %d\n", ret); - goto out_pm_runtime; + goto out_pll_clk; } dsi->dsi_bound = true; return 0; +out_pll_clk: + clk_disable_unprepare(dsi->pllref_clk); out_pm_runtime: pm_runtime_put(dsi->dev); if (dsi->slave)