diff options
author | Paul Cercueil <paul@crapouillou.net> | 2020-07-28 17:16:40 +0200 |
---|---|---|
committer | Paul Cercueil <paul@crapouillou.net> | 2020-07-29 02:29:26 +0200 |
commit | c114e72313045108d6ddc1847b4ffff4e50ab444 (patch) | |
tree | 9a602a92b0b6bb885d86006e823472cd922919bc | |
parent | d69de69f2be105b2474c05a5ca4827aac3e80ad3 (diff) | |
download | linux-c114e72313045108d6ddc1847b4ffff4e50ab444.tar.bz2 |
drm/ingenic: Handle errors of drm_atomic_get_plane_state
drm_atomic_get_plane_state() can return errors, so we need to handle
these.
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20200728151641.26124-2-paul@crapouillou.net
-rw-r--r-- | drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c index ada990a7f911..64eabab3ef69 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm-drv.c @@ -215,10 +215,17 @@ static int ingenic_drm_crtc_atomic_check(struct drm_crtc *crtc, if (priv->soc_info->has_osd) { f1_state = drm_atomic_get_plane_state(state->state, &priv->f1); + if (IS_ERR(f1_state)) + return PTR_ERR(f1_state); + f0_state = drm_atomic_get_plane_state(state->state, &priv->f0); + if (IS_ERR(f0_state)) + return PTR_ERR(f0_state); if (IS_ENABLED(CONFIG_DRM_INGENIC_IPU) && priv->ipu_plane) { ipu_state = drm_atomic_get_plane_state(state->state, priv->ipu_plane); + if (IS_ERR(ipu_state)) + return PTR_ERR(ipu_state); /* IPU and F1 planes cannot be enabled at the same time. */ if (f1_state->fb && ipu_state->fb) { |