linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: simplify the return expression of iceland_ih_hw_init
@ 2022-04-29  5:48 cgel.zte
  2022-04-29 15:16 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: cgel.zte @ 2022-04-29  5:48 UTC (permalink / raw)
  To: alexander.deucher
  Cc: christian.koenig, Xinhui.Pan, airlied, amd-gfx, dri-devel,
	linux-kernel, Minghao Chi, Zeal Robot

From: Minghao Chi <chi.minghao@zte.com.cn>

Simplify the return expression.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
index ddfe4eaeea05..aecad530b10a 100644
--- a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
@@ -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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] drm/amdgpu: simplify the return expression of iceland_ih_hw_init
  2022-04-29  5:48 [PATCH] drm/amdgpu: simplify the return expression of iceland_ih_hw_init cgel.zte
@ 2022-04-29 15:16 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2022-04-29 15:16 UTC (permalink / raw)
  To: CGEL
  Cc: Deucher, Alexander, Dave Airlie, Zeal Robot, xinhui pan, LKML,
	Maling list - DRI developers, amd-gfx list, Christian Koenig,
	Minghao Chi

Applied.  Thanks!

On Fri, Apr 29, 2022 at 1:48 AM <cgel.zte@gmail.com> wrote:
>
> From: Minghao Chi <chi.minghao@zte.com.cn>
>
> Simplify the return expression.
>
> Reported-by: Zeal Robot <zealci@zte.com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
> ---
>  drivers/gpu/drm/amd/amdgpu/iceland_ih.c | 7 +------
>  1 file changed, 1 insertion(+), 6 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> index ddfe4eaeea05..aecad530b10a 100644
> --- a/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> +++ b/drivers/gpu/drm/amd/amdgpu/iceland_ih.c
> @@ -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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-29 15:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-29  5:48 [PATCH] drm/amdgpu: simplify the return expression of iceland_ih_hw_init cgel.zte
2022-04-29 15:16 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).