drivers/amd/pm: check the return value of amdgpu_bo_kmap
amdgpu_bo_kmap() returns error when fails to map buffer object. Add the error check and propagate the error. Signed-off-by: Li Zhong <floridsleeves@gmail.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
d37f379ad0
commit
8abbc4f768
@ -1384,13 +1384,16 @@ static int kv_dpm_enable(struct amdgpu_device *adev)
|
||||
static void kv_dpm_disable(struct amdgpu_device *adev)
|
||||
{
|
||||
struct kv_power_info *pi = kv_get_pi(adev);
|
||||
int err;
|
||||
|
||||
amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
|
||||
AMDGPU_THERMAL_IRQ_LOW_TO_HIGH);
|
||||
amdgpu_irq_put(adev, &adev->pm.dpm.thermal.irq,
|
||||
AMDGPU_THERMAL_IRQ_HIGH_TO_LOW);
|
||||
|
||||
amdgpu_kv_smc_bapm_enable(adev, false);
|
||||
err = amdgpu_kv_smc_bapm_enable(adev, false);
|
||||
if (err)
|
||||
DRM_ERROR("amdgpu_kv_smc_bapm_enable failed\n");
|
||||
|
||||
if (adev->asic_type == CHIP_MULLINS)
|
||||
kv_enable_nb_dpm(adev, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user