Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Zimmermann <tzimmermann@suse.de>2019-09-30 15:52:13 +0200
committerThomas Zimmermann <tzimmermann@suse.de>2019-09-30 16:29:06 +0200
commitb5915958e07217b5322885535fd47fc1b1b0ca12 (patch)
treee7a9389b12e280c761baf18bc883276250b6b8ba
parent0b48ba59cecd3b26e1edd016997f23a80e8c360f (diff)
drm/msm/dsi: Fix return value check for clk_get_parent (bsc#1152472)
-rw-r--r--patches.suse/0001-drm-msm-dsi-Fix-return-value-check-for-clk_get_paren.patch51
-rw-r--r--series.conf1
2 files changed, 52 insertions, 0 deletions
diff --git a/patches.suse/0001-drm-msm-dsi-Fix-return-value-check-for-clk_get_paren.patch b/patches.suse/0001-drm-msm-dsi-Fix-return-value-check-for-clk_get_paren.patch
new file mode 100644
index 0000000000..efca7bdd60
--- /dev/null
+++ b/patches.suse/0001-drm-msm-dsi-Fix-return-value-check-for-clk_get_paren.patch
@@ -0,0 +1,51 @@
+From 5fb9b797d5ccf311ae4aba69e86080d47668b5f7 Mon Sep 17 00:00:00 2001
+From: Sean Paul <seanpaul@chromium.org>
+Date: Wed, 7 Aug 2019 14:51:50 -0400
+Subject: drm/msm/dsi: Fix return value check for clk_get_parent
+Git-commit: 5fb9b797d5ccf311ae4aba69e86080d47668b5f7
+Patch-mainline: v5.4-rc1
+References: bsc#1152472
+
+clk_get_parent returns an error pointer upon failure, not NULL. So the
+checks as they exist won't catch a failure. This patch changes the
+checks and the return values to properly handle an error pointer.
+
+Fixes: c4d8cfe516dc ("drm/msm/dsi: add implementation for helper functions")
+Cc: Sibi Sankar <sibis@codeaurora.org>
+Cc: Sean Paul <seanpaul@chromium.org>
+Cc: Rob Clark <robdclark@chromium.org>
+Cc: <stable@vger.kernel.org> # v4.19+
+Signed-off-by: Sean Paul <seanpaul@chromium.org>
+Signed-off-by: Rob Clark <robdclark@chromium.org>
+Acked-by: Thomas Zimmermann <tzimmermann@suse.de>
+---
+ drivers/gpu/drm/msm/dsi/dsi_host.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
+index e65c2b8bf555..663ff9f4fac9 100644
+--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
++++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
+@@ -421,15 +421,15 @@ static int dsi_clk_init(struct msm_dsi_host *msm_host)
+ }
+
+ msm_host->byte_clk_src = clk_get_parent(msm_host->byte_clk);
+- if (!msm_host->byte_clk_src) {
+- ret = -ENODEV;
++ if (IS_ERR(msm_host->byte_clk_src)) {
++ ret = PTR_ERR(msm_host->byte_clk_src);
+ pr_err("%s: can't find byte_clk clock. ret=%d\n", __func__, ret);
+ goto exit;
+ }
+
+ msm_host->pixel_clk_src = clk_get_parent(msm_host->pixel_clk);
+- if (!msm_host->pixel_clk_src) {
+- ret = -ENODEV;
++ if (IS_ERR(msm_host->pixel_clk_src)) {
++ ret = PTR_ERR(msm_host->pixel_clk_src);
+ pr_err("%s: can't find pixel_clk clock. ret=%d\n", __func__, ret);
+ goto exit;
+ }
+--
+2.23.0
+
diff --git a/series.conf b/series.conf
index c0bc0f1790..2cdbdd18a8 100644
--- a/series.conf
+++ b/series.conf
@@ -106,6 +106,7 @@
patches.suse/0003-Revert-drm-amd-display-add-global-master-update-lock.patch
patches.suse/0004-Revert-drm-amd-display-Fix-underscan-not-using-prope.patch
patches.suse/0005-Revert-drm-amdgpu-free-up-the-first-paging-queue-v2.patch
+ patches.suse/0001-drm-msm-dsi-Fix-return-value-check-for-clk_get_paren.patch
patches.suse/powerpc-pseries-Fix-cpu_hotplug_lock-acquisition-in-.patch
patches.suse/powerpc-powernv-ioda-Fix-race-in-TCE-level-allocatio.patch
patches.suse/powerpc-xmon-Check-for-HV-mode-when-dumping-XIVE-inf.patch