[PATCH 06/33] drm/omap: drm_atomic_get_plane_state() may return ERR_PTR

Laurent Pinchart laurent.pinchart at ideasonboard.com
Tue Feb 23 22:01:41 UTC 2016


Hi Tomi,

Thank you for the patch.

On Friday 19 February 2016 11:47:41 Tomi Valkeinen wrote:
> From: Jyri Sarha <jsarha at ti.com>
> 
> 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 at ti.com>
> Acked-by: Tomi Valkeinen <tomi.valkeinen at ti.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c
> b/drivers/gpu/drm/omapdrm/omap_crtc.c index 7dd3d44a93e5..f5b19d18fa8b
> 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -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);
>  }

-- 
Regards,

Laurent Pinchart



More information about the dri-devel mailing list