In the Linux kernel, the following vulnerability has been resolved: drm/amd/display: Fix a NULL pointer dereference in amdgpudmconnectoraddcommonmodes() In amdgpudmconnectoraddcommonmodes(), amdgpudmcreatecommonmode() is assigned to mode and is passed to drmmodeprobedadd() directly after that. drmmodeprobedadd() passes &mode->head to listaddtail(), and there is a dereference of it in listaddtail() without recoveries, which could lead to NULL pointer dereference on failure of amdgpudmcreatecommonmode(). Fix this by adding a NULL check of mode. This bug was found by a static analyzer. Builds with 'make allyesconfig' show no new warnings, and our static analyzer no longer warns about this code.