On Wed, 11 Oct 2023, Ma Ke wrote:
> In drm_mode_std(), the return value of drm_gtf_mode(),
> drm_gtf_mode() and drm_cvt_mode() is assigned to mode,
> which will lead to a NULL pointer dereference on failure
> of drm_gtf_mode(), drm_gtf_mode() and drm_cvt_mode().
> Add a check to avoid null point
In drm_mode_std(), the return value of drm_gtf_mode(),
drm_gtf_mode() and drm_cvt_mode() is assigned to mode,
which will lead to a NULL pointer dereference on failure
of drm_gtf_mode(), drm_gtf_mode() and drm_cvt_mode().
Add a check to avoid null point dereference.
Signed-off-by: Ma Ke
---