OSDN Git Service

drm/amd/powerplay: fix various dereferences of a pointer before it is null checked
authorColin Ian King <colin.king@canonical.com>
Thu, 12 Dec 2019 18:16:57 +0000 (18:16 +0000)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 18 Dec 2019 21:09:05 +0000 (16:09 -0500)
commit63408972e4715ee03e470d9616e2b6aebd6f2595
tree126e3c5cb63e58c5a50318fd42a33bb79bfc56dc
parentb3eca59d998587b1930cb846910ec9824b9c2122
drm/amd/powerplay: fix various dereferences of a pointer before it is null checked

There are several occurrances of the pointer hwmgr being dereferenced
before it is null checked.  Fix these by performing the dereference
of hwmgr after it has been null checked.

Addresses-Coverity: ("Dereference before null check")
Fixes: c9ffa427db34e6 ("drm/amd/powerplay: enable pp one vf mode for vega10")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/amd_powerplay.c
drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c