[PATCH] drm/atomic-helper: Validate pointer before dereference

Gerd Hoffmann kraxel at redhat.com
Tue Mar 12 06:59:27 UTC 2019


  Hi,

> -			if (funcs->atomic_enable)
> -				funcs->atomic_enable(crtc, old_crtc_state);
> -			else
> -				funcs->commit(crtc);
> +			if (funcs) {
> +				if (funcs->atomic_enable)
> +					funcs->atomic_enable(crtc,
> +							     old_crtc_state);
> +				else if (funcs->atomic_enable)

"if (funcs->commit)" I guess?

> +					funcs->commit(crtc);
> +			}

cheers,
  Gerd



More information about the dri-devel mailing list