Re: [PATCH] drm/komeda: Potential error pointer dereference

Liviu Dudau
2019-05-03T14:41:14Z

Acked-by: Liviu Dudau <liviu.dudau@arm.com>

I'll pull this and send it as a fix after -rc1.

Best regards,
Liviu

> ---
> drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> index 07ed0cc1bc44..c7e5fc6e5500 100644
> --- a/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> +++ b/drivers/gpu/drm/arm/display/komeda/komeda_plane.c
> @@ -64,7 +64,7 @@ komeda_plane_atomic_check(struct drm_plane *plane,
> return 0;
>
> crtc_st = drm_atomic_get_crtc_state(state->state, state->crtc);
> - if (!crtc_st->enable) {
> + if (IS_ERR(crtc_st) || !crtc_st->enable) {
> DRM_DEBUG_ATOMIC("Cannot update plane on a disabled CRTC.\n");
> return -EINVAL;
> }
> --
> 2.18.0
>

--
==========
| I would like to |
| fix the world, |
| but they're not |
| giving me the |
\ source code! /
---------------
¯\_(ツ)_/¯