Skip to contentSkip to conversation

drm/amdgpu: simplify the return expression of iceland_ih_hw_init

PATCH Applied [email protected] 2 participants 2 messages Apr 29, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amdgpu: simplify the return expression of iceland_ih_hw_init

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/iceland_ih.c +1 -6
index ddfe4eaeea05..aecad530b10a 100644
@@ -308,14 +308,9 @@ static int iceland_ih_sw_fini(void *handle)
 
 static int iceland_ih_hw_init(void *handle)
 {
-	int r;
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	r = iceland_ih_irq_init(adev);
-	if (r)
-		return r;
-
-	return 0;
+	return iceland_ih_irq_init(adev);
 }
 
 static int iceland_ih_hw_fini(void *handle)
Signature · 1 line
2.25.1
Applied
#1 lore raw

Applied. Thanks!

Quoted 35 lines · On Fri, Apr 29, 2022 at 1:48 AM <[email protected]> wrote:

From: Minghao Chi <[email protected]>

Simplify the return expression.

---
 drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/iceland_ih.c +1 -7
index ddfe4eaeea05..aecad530b10a 100644
@@ -308,14 +308,9 @@ static int iceland_ih_sw_fini(void *handle)
 
 static int iceland_ih_hw_init(void *handle)
 {
-       int r;
        struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-       r = iceland_ih_irq_init(adev);
-       if (r)
-               return r;
-
-       return 0;
+       return iceland_ih_irq_init(adev);
 }
 
 static int iceland_ih_hw_fini(void *handle)
--

2.25.1