Commit edc4d3db authored by Huang Rui's avatar Huang Rui Committed by Alex Deucher
Browse files

drm/amdgpu: remove superfluous check

parent 57ea8c7b
Loading
Loading
Loading
Loading
+5 −10
Original line number Original line Diff line number Diff line
@@ -435,14 +435,9 @@ static int psp_hw_fini(void *handle)


	psp_ring_destroy(psp, PSP_RING_TYPE__KM);
	psp_ring_destroy(psp, PSP_RING_TYPE__KM);


	if (psp->tmr_buf)
	amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf);
	amdgpu_bo_free_kernel(&psp->tmr_bo, &psp->tmr_mc_addr, &psp->tmr_buf);

	if (psp->fw_pri_buf)
	amdgpu_bo_free_kernel(&psp->fw_pri_bo,
	amdgpu_bo_free_kernel(&psp->fw_pri_bo,
			      &psp->fw_pri_mc_addr, &psp->fw_pri_buf);
			      &psp->fw_pri_mc_addr, &psp->fw_pri_buf);

	if (psp->fence_buf_bo)
	amdgpu_bo_free_kernel(&psp->fence_buf_bo,
	amdgpu_bo_free_kernel(&psp->fence_buf_bo,
			      &psp->fence_buf_mc_addr, &psp->fence_buf);
			      &psp->fence_buf_mc_addr, &psp->fence_buf);


+4 −4
Original line number Original line Diff line number Diff line
@@ -341,10 +341,10 @@ int psp_v3_1_ring_destroy(struct psp_context *psp, enum psp_ring_type ring_type)
	ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64),
	ret = psp_wait_for(psp, SOC15_REG_OFFSET(MP0, 0, mmMP0_SMN_C2PMSG_64),
			   0x80000000, 0x80000000, false);
			   0x80000000, 0x80000000, false);


	if (ring->ring_mem)
	amdgpu_bo_free_kernel(&adev->firmware.rbuf,
	amdgpu_bo_free_kernel(&adev->firmware.rbuf,
			      &ring->ring_mem_mc_addr,
			      &ring->ring_mem_mc_addr,
			      (void **)&ring->ring_mem);
			      (void **)&ring->ring_mem);

	return ret;
	return ret;
}
}