Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3635722pxb; Mon, 24 Jan 2022 14:04:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJyljJzkXV2YaN6Wsgkv90N4FiB7xbUvvDYL3z4BR3YykSVvWIrkXg+VX1Rw7y/CZmXpxNiY X-Received: by 2002:a17:90a:bb13:: with SMTP id u19mr362675pjr.41.1643061876909; Mon, 24 Jan 2022 14:04:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643061876; cv=none; d=google.com; s=arc-20160816; b=ubTbgfA0SVHxZaDNXNGtzw1tFXCbd2b6hwpN0a0EctRjupqHUlhgW1tT1Se8L5Pd/4 ycWkRPsSnHExM9omXqZqd8qcz1oBNICF35ngLPyz79JfmzNjRFTFjHh+nKrCKY5AAwFB UK04sKSbHh4QuX3/444y9ajvW0vg2XCmsCBjn3QYsyg7KLz1vVHGCRgih/MJhL+OKyDm KQSojj1JJwnHpPa2T+q3XayOZ2wV8+A4ZbRcdXtESudHBTAF2laW741t5N54NFpSWyyc ipjybjcVgSZUJtY+h16zVgCfBCHnDO61ShWIyJTdCvZ2zMsCUfQwaNuhxTpqofhnvhRM f5eA== 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=tqh1/NwiCRfPtyzgQFL0oMgvaQzyqKkCuYbLhDQZqwY=; b=qB+3/IqSAhdSx/kxT0YDU8op+jBbeXKLaLanAQnjT6waLbkI5kmKBj2WDaajZutCcd 4XbqU5KDk0v7zY7uX4eFFxVhmAys9T9BL6uKe3if+6Is3EajMc1ljVTRSivG6Ct8GPJ3 cZjBs57djF+iByuOy2Bz2O7q9NMssyfTneuygxsY1npVPzonyO8FY6Fv4jUTthItOuhR IiWmWNMtT3owjcwn1O3iV1e4NeNI/Ms3Cca2cV6yvorDlSs1pu68ji6C8QYC3xzONmxd 3MLMY3Dhzj0Q9u8CHnoCr1aAbTUc06hAW24vn2Mb3Lg7PDnA92wcpU3NDXNaNAlxrDVd Dt8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=zmwnb8YU; 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 v191si8277503pgd.336.2022.01.24.14.04.24; Mon, 24 Jan 2022 14:04:36 -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=zmwnb8YU; 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 S1576382AbiAXVxa (ORCPT + 99 others); Mon, 24 Jan 2022 16:53:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50958 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1450661AbiAXVVI (ORCPT ); Mon, 24 Jan 2022 16:21:08 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 89494C06174E; Mon, 24 Jan 2022 12:15:29 -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 dfw.source.kernel.org (Postfix) with ESMTPS id 2851361008; Mon, 24 Jan 2022 20:15:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 87DF5C340E5; Mon, 24 Jan 2022 20:15:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643055328; bh=AeFGPqmGgW8Wr62x6L1iN4SCcK/Db7Mw5iFBl8joHfA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zmwnb8YUvNaOcgnHvZToON91aRtrq079nOS+Ht05xNRkoxsyvwN4AJssT9xODTy/6 4kcE0vO3GS2F9TKzXcuSD1MmzyQa155mcAbH0EF4lEoyYdZurXxScyxupFV2gTZH31 bBwjpREWdTZrN5qk27VHXz6PhhZ9ND1y+Poraa+0= 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.15 083/846] drm/rockchip: dsi: Disable PLL clock on bind error Date: Mon, 24 Jan 2022 19:33:20 +0100 Message-Id: <20220124184103.852970342@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184100.867127425@linuxfoundation.org> References: <20220124184100.867127425@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(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c index fa40801767191..0ed13d81fe606 100644 --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c @@ -943,7 +943,7 @@ static int dw_mipi_dsi_rockchip_bind(struct device *dev, 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); @@ -955,17 +955,19 @@ static int dw_mipi_dsi_rockchip_bind(struct device *dev, 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; } return 0; +out_pll_clk: + clk_disable_unprepare(dsi->pllref_clk); out_pm_runtime: pm_runtime_put(dsi->dev); if (dsi->slave) -- 2.34.1