[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180801165039.702352794@linuxfoundation.org>
Date: Wed, 1 Aug 2018 18:50:14 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Philippe Cornu <philippe.cornu@...com>,
Dan Carpenter <dan.carpenter@...cle.com>,
yannick fertre <yannick.fertre@...com>,
Sasha Levin <alexander.levin@...rosoft.com>
Subject: [PATCH 4.17 279/336] drm/stm: ltdc: fix warning in ltdc_crtc_update_clut()
4.17-stable review patch. If anyone has any objections, please let me know.
------------------
From: Philippe CORNU <philippe.cornu@...com>
[ Upstream commit c20f5f69c898899027c3e573afaab837195895b6 ]
Fix the warning
"warn: variable dereferenced before check 'crtc' (see line 390)"
by removing unnecessary checks as ltdc_crtc_update_clut() is
only called from ltdc_crtc_atomic_flush() where crtc and
crtc->state are not NULL.
Many thanks to Dan Carpenter for the bug report
https://lists.freedesktop.org/archives/dri-devel/2018-February/166918.html
Signed-off-by: Philippe Cornu <philippe.cornu@...com>
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Reviewed-by: yannick fertre <yannick.fertre@...com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180410135312.3553-1-philippe.cornu@st.com
Signed-off-by: Sasha Levin <alexander.levin@...rosoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/gpu/drm/stm/ltdc.c | 3 ---
1 file changed, 3 deletions(-)
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -392,9 +392,6 @@ static void ltdc_crtc_update_clut(struct
u32 val;
int i;
- if (!crtc || !crtc->state)
- return;
-
if (!crtc->state->color_mgmt_changed || !crtc->state->gamma_lut)
return;
Powered by blists - more mailing lists