drm/amdgpu: simplify the return expression of vega10_ih_hw_init()
Subsystems (2)
PATCH 1/1 drm/amdgpu: simplify the return expression of vega10_ih_hw_init()
From: Minghao Chi <[email protected]>
Simplify the return expression.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/vega10_ih.c +1 -6
@@ -521,14 +521,9 @@ static int vega10_ih_sw_fini(void *handle)static int vega10_ih_hw_init (void *handle) { -int r;struct amdgpu_device *adev = (struct amdgpu_device *)handle; - r =vega10_ih_irq_init (adev); -if (r) -return r; - -return 0 ; +return vega10_ih_irq_init (adev); }static int vega10_ih_hw_fini (void *handle)
Signature · 1 line
2.25.1
Alex Deucher
AppliedApplied. Thanks!
Alex
Quoted 35 lines · On Wed, May 4, 2022 at 10:22 PM <[email protected]> wrote:
From: Minghao Chi <[email protected]>
Simplify the return expression.
Reported-by Zeal Robot <[email protected]>Signed-off-by Minghao Chi <[email protected]>--- drivers/gpu/drm/amd/amdgpu/vega10_ih.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)drivers/gpu/drm/amd/amdgpu/vega10_ih.c +1
-7@@ -521,14 +521,9 @@ static int vega10_ih_sw_fini(void *handle)static int vega10_ih_hw_init (void *handle) { -int r;struct amdgpu_device *adev = (struct amdgpu_device *)handle; - r =vega10_ih_irq_init (adev); -if (r) -return r; - -return 0 ; +return vega10_ih_irq_init (adev); }static int vega10_ih_hw_fini (void *handle) --2.25.1