aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ingenic
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2020-07-19 11:38:34 +0200
committerPaul Cercueil <paul@crapouillou.net>2020-07-19 13:03:15 +0200
commit40a55dc13e9dfa3a9575fd95633733554f4cde67 (patch)
tree0bc9c42901e257163d67462f7ecfd937f5faa1fd /drivers/gpu/drm/ingenic
parentdrm/ingenic: Bump driver to version 1.1 (diff)
downloadlinux-dev-40a55dc13e9dfa3a9575fd95633733554f4cde67.tar.xz
linux-dev-40a55dc13e9dfa3a9575fd95633733554f4cde67.zip
drm/ingenic: Silence uninitialized-variable warning
Silence compiler warning about used but uninitialized 'ipu_state' variable. In practice, the variable would never be used when uninitialized, but the compiler cannot know that 'priv->ipu_plane' will always be NULL if CONFIG_INGENIC_IPU is disabled. Silence the warning by initializing the value to NULL. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Reviewed-by: Sam Ravnborg <sam@ravnborg.org> Link: https://patchwork.freedesktop.org/patch/msgid/20200719093834.14084-1-paul@crapouillou.net
Diffstat (limited to 'drivers/gpu/drm/ingenic')
-rw-r--r--drivers/gpu/drm/ingenic/ingenic-drm-drv.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
index b6d946fbeaf5..ada990a7f911 100644
--- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
+++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c
@@ -198,7 +198,7 @@ static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc,
struct drm_crtc_state *state)
{
struct ingenic_drm *priv = drm_crtc_get_priv(crtc);
- struct drm_plane_state *f1_state, *f0_state, *ipu_state;
+ struct drm_plane_state *f1_state, *f0_state, *ipu_state = NULL;
long rate;
if (!drm_atomic_crtc_needs_modeset(state))
@@ -229,7 +229,7 @@ static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc,
/* If all the planes are disabled, we won't get a VBLANK IRQ */
priv->no_vblank = !f1_state->fb && !f0_state->fb &&
- !(priv->ipu_plane && ipu_state->fb);
+ !(ipu_state && ipu_state->fb);
}
return 0;