Re: [PATCH] drm/atomic: fix null pointer access to mode_fixup callback

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Op 11-08-15 om 14:00 schreef Inki Dae:
> This patch fixes null pointer access incurred when
> encoder driver didn't set its own mode_fixup callback.
>
> mode_fixup callback shoudn't be called if the callback
> of drm_encoder_helper_funcs is NULL.
>
> Signed-off-by: Inki Dae <inki.dae@xxxxxxxxxxx>
> ---
>  drivers/gpu/drm/drm_atomic_helper.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index 5b59d5ad..b69469c 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -299,6 +299,9 @@ mode_fixup(struct drm_atomic_state *state)
>  				return ret;
>  			}
>  		} else {
> +			if (!funcs->mode_fixup)
> +				continue;
Change it to } else if (funcs->mode_fixup) { ?

Reviewed-By: Maarten Lankhorst <maarten.lankhorst@xxxxxxxxxxxxxxx>


>  			ret = funcs->mode_fixup(encoder, &crtc_state->mode,
>  						&crtc_state->adjusted_mode);
>  			if (!ret) {

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux