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

From: Gerd Hoffmann
Date: Tue Mar 12 2019 - 02:59:31 EST


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