drm/amdgpu/mes: simplify the return expression of mes_v10_1_ring_init
authorQinglang Miao <miaoqinglang@huawei.com>
Mon, 21 Sep 2020 13:10:11 +0000 (21:10 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Sep 2020 21:37:37 +0000 (17:37 -0400)
Simplify the return expression.

Signed-off-by: Qinglang Miao <miaoqinglang@huawei.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/mes_v10_1.c

index 4b74658..1c22d83 100644 (file)
@@ -832,7 +832,6 @@ static int mes_v10_1_queue_init(struct amdgpu_device *adev)
 static int mes_v10_1_ring_init(struct amdgpu_device *adev)
 {
        struct amdgpu_ring *ring;
-       int r;
 
        ring = &adev->mes.ring;
 
@@ -849,11 +848,7 @@ static int mes_v10_1_ring_init(struct amdgpu_device *adev)
        ring->no_scheduler = true;
        sprintf(ring->name, "mes_%d.%d.%d", ring->me, ring->pipe, ring->queue);
 
-       r = amdgpu_ring_init(adev, ring, 1024, NULL, 0, AMDGPU_RING_PRIO_DEFAULT);
-       if (r)
-               return r;
-
-       return 0;
+       return amdgpu_ring_init(adev, ring, 1024, NULL, 0, AMDGPU_RING_PRIO_DEFAULT);
 }
 
 static int mes_v10_1_mqd_sw_init(struct amdgpu_device *adev)