OSDN Git Service

drm/amdgpu: Move null pointer dereference check
authorAustin Kim <austindh.kim@gmail.com>
Fri, 30 Aug 2019 08:07:04 +0000 (17:07 +0900)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 30 Aug 2019 20:37:17 +0000 (15:37 -0500)
commit9c9284f9cee9052da4cad575da8dc5f2bbb31065
treeaa88cb76e109ac5aa96173e79f06a5eaf0dfce59
parent20c14ee135011f2a0fb2f987f05fd9655e804a9d
drm/amdgpu: Move null pointer dereference check

Null pointer dereference check should have been checked,
ahead of below routine.
struct amdgpu_device *adev = hwmgr->adev;

With this commit, it could avoid potential NULL dereference.

Signed-off-by: Austin Kim <austindh.kim@gmail.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/smumgr/smu8_smumgr.c