Re: [PATCH v2] drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference

2024-04-16 Thread Robert Foss
Hey Aleksandr, On Fri, Apr 12, 2024 at 10:40 AM Aleksandr Mishin wrote: > > In cdns_mhdp_atomic_enable(), the return value of drm_mode_duplicate() is > assigned to mhdp_state->current_mode, and there is a dereference of it in > drm_mode_set_name(), which will lead to a NULL pointer dereference on

[PATCH v2] drm: bridge: cdns-mhdp8546: Fix possible null pointer dereference

2024-04-12 Thread Aleksandr Mishin
In cdns_mhdp_atomic_enable(), the return value of drm_mode_duplicate() is assigned to mhdp_state->current_mode, and there is a dereference of it in drm_mode_set_name(), which will lead to a NULL pointer dereference on failure of drm_mode_duplicate(). Fix this bug by adding a check of mhdp_state->c