[PATCH] drm/amdgpu: fix regression in amdgpu_ucode_init_bo

Huang Rui ray.huang at amd.com
Thu Sep 15 02:52:37 UTC 2016


On Wed, Sep 14, 2016 at 04:58:21PM +0200, Christian König wrote:
> From: Christian König <christian.koenig at amd.com>
> 
> Going into the error case when everything works is a bad idea.
> 
> Signed-off-by: Christian König <christian.koenig at amd.com>
> ---

Christian, thanks.

Acked-by: Huang Rui <ray.huang at amd.com>

>  drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> index 4a5c211..7a05f79 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ucode.c
> @@ -283,6 +283,7 @@ int amdgpu_ucode_init_bo(struct amdgpu_device *adev)
>  			fw_offset += ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE);
>  		}
>  	}
> +	return 0;
>  
>  failed_kmap:
>  	amdgpu_bo_unpin(*bo);
> @@ -291,8 +292,7 @@ failed_pin:
>  failed_reserve:
>  	amdgpu_bo_unref(bo);
>  failed:
> -	if (err)
> -		adev->firmware.smu_load = false;
> +	adev->firmware.smu_load = false;
>  
>  	return err;
>  }
> -- 
> 2.5.0
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list