From 3f41085a8cb8d20a211b941e1f265cafdd411ec6 Mon Sep 17 00:00:00 2001 From: Rex Zhu Date: Mon, 9 Oct 2017 13:50:31 +0800 Subject: [PATCH 1992/4131] drm/amdgpu: refine code delete duplicated error handling in function amdgpu_ucode_init_bo, when failed, it will set load_type to AMDGPU_FW_LOAD_DIRECT. Change-Id: I72d7e6fb541ac7e5fd2376895d236c2a2c480e13 Reviewed-by: Alex Deucher Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 6bb149c..66c7fd7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -1738,8 +1738,8 @@ static int amdgpu_init(struct amdgpu_device *adev) } mutex_lock(&adev->firmware.mutex); - if (amdgpu_ucode_init_bo(adev)) - adev->firmware.load_type = AMDGPU_FW_LOAD_DIRECT; + if (adev->firmware.load_type != AMDGPU_FW_LOAD_DIRECT) + amdgpu_ucode_init_bo(adev); mutex_unlock(&adev->firmware.mutex); for (i = 0; i < adev->num_ip_blocks; i++) { -- 2.7.4