drm/omap: drm_atomic_get_plane_state() may return ERR_PTR

drm_atomic_get_plane_state() may return ERR_PTR. Handle
drm_atomic_get_plane_state() return values right in
omap_crtc_atomic_set_property().

Signed-off-by: Jyri Sarha <jsarha@ti.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
Jyri Sarha 2015-10-28 14:00:42 +02:00 committed by Tomi Valkeinen
parent 8e54adfd9c
commit a7696ea740
1 changed files with 2 additions and 2 deletions

View File

@ -433,8 +433,8 @@ static int omap_crtc_atomic_set_property(struct drm_crtc *crtc,
*/
plane_state = drm_atomic_get_plane_state(state->state, plane);
if (!plane_state)
return -EINVAL;
if (IS_ERR(plane_state))
return PTR_ERR(plane_state);
return drm_atomic_plane_set_property(plane, plane_state, property, val);
}