Commit da51e50d authored by Qinglang Miao's avatar Qinglang Miao Committed by Alex Deucher

drm/amdgpu: simplify the return expression

Simplify the return expression.
Signed-off-by: default avatarQinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent d94c8250
...@@ -316,14 +316,9 @@ static int cik_ih_sw_fini(void *handle) ...@@ -316,14 +316,9 @@ static int cik_ih_sw_fini(void *handle)
static int cik_ih_hw_init(void *handle) static int cik_ih_hw_init(void *handle)
{ {
int r;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
r = cik_ih_irq_init(adev); return cik_ih_irq_init(adev);
if (r)
return r;
return 0;
} }
static int cik_ih_hw_fini(void *handle) static int cik_ih_hw_fini(void *handle)
......
...@@ -2196,7 +2196,6 @@ static int gfx_v9_0_gpu_early_init(struct amdgpu_device *adev) ...@@ -2196,7 +2196,6 @@ static int gfx_v9_0_gpu_early_init(struct amdgpu_device *adev)
static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
int mec, int pipe, int queue) int mec, int pipe, int queue)
{ {
int r;
unsigned irq_type; unsigned irq_type;
struct amdgpu_ring *ring = &adev->gfx.compute_ring[ring_id]; struct amdgpu_ring *ring = &adev->gfx.compute_ring[ring_id];
unsigned int hw_prio; unsigned int hw_prio;
...@@ -2221,13 +2220,8 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id, ...@@ -2221,13 +2220,8 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue) ? hw_prio = amdgpu_gfx_is_high_priority_compute_queue(adev, ring->queue) ?
AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL; AMDGPU_GFX_PIPE_PRIO_HIGH : AMDGPU_GFX_PIPE_PRIO_NORMAL;
/* type-2 packets are deprecated on MEC, use type-3 instead */ /* type-2 packets are deprecated on MEC, use type-3 instead */
r = amdgpu_ring_init(adev, ring, 1024, return amdgpu_ring_init(adev, ring, 1024,
&adev->gfx.eop_irq, irq_type, hw_prio); &adev->gfx.eop_irq, irq_type, hw_prio);
if (r)
return r;
return 0;
} }
static int gfx_v9_0_sw_init(void *handle) static int gfx_v9_0_sw_init(void *handle)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment