aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Brezillon <boris.brezillon@bootlin.com>2018-07-24 09:33:00 -0400
committerBoris Brezillon <boris.brezillon@bootlin.com>2018-07-25 15:11:45 -0400
commitde2d8db395c32d121d02871819444b631f73e0b6 (patch)
tree152b5cd33b350583d7a6572b864a1f41ed7e56a2
parent603ba2dfb338b307aebe95fe344c479a59b3a175 (diff)
drm/atomic: Initialize variables in drm_atomic_helper_async_check() to make gcc happy
drm_atomic_helper_async_check() declares the plane, old_plane_state and new_plane_state variables to iterate over all planes of the atomic state and make sure only one plane is enabled. Unfortunately gcc is not smart enough to figure out that the check on n_planes is enough to guarantee that plane, new_plane_state and old_plane_state are initialized. Explicitly initialize those variables to NULL to make gcc happy. Fixes: fef9df8b5945 ("drm/atomic: initial support for asynchronous plane update") Cc: <stable@vger.kernel.org> Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com> Reviewed-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20180724133300.32023-1-boris.brezillon@bootlin.com
-rw-r--r--drivers/gpu/drm/drm_atomic_helper.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
index ff858b890045..81e32199d3ef 100644
--- a/drivers/gpu/drm/drm_atomic_helper.c
+++ b/drivers/gpu/drm/drm_atomic_helper.c
@@ -1510,8 +1510,9 @@ int drm_atomic_helper_async_check(struct drm_device *dev,
1510{ 1510{
1511 struct drm_crtc *crtc; 1511 struct drm_crtc *crtc;
1512 struct drm_crtc_state *crtc_state; 1512 struct drm_crtc_state *crtc_state;
1513 struct drm_plane *plane; 1513 struct drm_plane *plane = NULL;
1514 struct drm_plane_state *old_plane_state, *new_plane_state; 1514 struct drm_plane_state *old_plane_state = NULL;
1515 struct drm_plane_state *new_plane_state = NULL;
1515 const struct drm_plane_helper_funcs *funcs; 1516 const struct drm_plane_helper_funcs *funcs;
1516 int i, n_planes = 0; 1517 int i, n_planes = 0;
1517 1518