In the Linux kernel, the following vulnerability has been resolved:
drm/amd/display: Add 'replay' NULL check in 'edpsetreplayallowactive()'
In the first if statement, we're checking if 'replay' is NULL. But in the second if statement, we're not checking if 'replay' is NULL again before calling replay->funcs->replaysetpower_opt().
if (replay == NULL && force_static) return false;
...
if (link->replaysettings.replayfeatureenabled && replay->funcs->replaysetpoweropt) { replay->funcs->replaysetpoweropt(replay, *poweropts, panelinst); link->replaysettings.replaypoweroptactive = *poweropts; }
If 'replay' is NULL, this will cause a null pointer dereference.
Fixes the below found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/link/protocols/linkedppanelcontrol.c:895 edpsetreplayallow_active() error: we previously assumed 'replay' could be null (see line 887)