2020-09-21 13:18:09

by Qinglang Miao

[permalink] [raw]
Subject: [PATCH -next] drm/panfrost: simplify the return expression of cz_ih_hw_init()

Simplify the return expression.

Signed-off-by: Qinglang Miao <[email protected]>
---
drivers/gpu/drm/panfrost/panfrost_device.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
index e68967338..ea8d31863 100644
--- a/drivers/gpu/drm/panfrost/panfrost_device.c
+++ b/drivers/gpu/drm/panfrost/panfrost_device.c
@@ -18,19 +18,13 @@

static int panfrost_reset_init(struct panfrost_device *pfdev)
{
- int err;
-
pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
if (IS_ERR(pfdev->rstc)) {
dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
return PTR_ERR(pfdev->rstc);
}

- err = reset_control_deassert(pfdev->rstc);
- if (err)
- return err;
-
- return 0;
+ return reset_control_deassert(pfdev->rstc);
}

static void panfrost_reset_fini(struct panfrost_device *pfdev)
--
2.23.0


2020-09-21 14:20:18

by Philipp Zabel

[permalink] [raw]
Subject: Re: [PATCH -next] drm/panfrost: simplify the return expression of cz_ih_hw_init()

On Mon, 2020-09-21 at 21:10 +0800, Qinglang Miao wrote:
> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <[email protected]>
> ---
> drivers/gpu/drm/panfrost/panfrost_device.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index e68967338..ea8d31863 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -18,19 +18,13 @@
>
> static int panfrost_reset_init(struct panfrost_device *pfdev)
> {
> - int err;
> -
> pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
> if (IS_ERR(pfdev->rstc)) {
> dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
> return PTR_ERR(pfdev->rstc);
> }
>
> - err = reset_control_deassert(pfdev->rstc);
> - if (err)
> - return err;
> -
> - return 0;
> + return reset_control_deassert(pfdev->rstc);
> }
>
> static void panfrost_reset_fini(struct panfrost_device *pfdev)

Reviewed-by: Philipp Zabel <[email protected]>

regards
Philipp

2020-10-01 10:59:51

by Steven Price

[permalink] [raw]
Subject: Re: [PATCH -next] drm/panfrost: simplify the return expression of cz_ih_hw_init()

On 21/09/2020 14:10, Qinglang Miao wrote:
> Simplify the return expression.
>
> Signed-off-by: Qinglang Miao <[email protected]>

Reviewed-by: Steven Price <[email protected]>

> ---
> drivers/gpu/drm/panfrost/panfrost_device.c | 8 +-------
> 1 file changed, 1 insertion(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/panfrost/panfrost_device.c b/drivers/gpu/drm/panfrost/panfrost_device.c
> index e68967338..ea8d31863 100644
> --- a/drivers/gpu/drm/panfrost/panfrost_device.c
> +++ b/drivers/gpu/drm/panfrost/panfrost_device.c
> @@ -18,19 +18,13 @@
>
> static int panfrost_reset_init(struct panfrost_device *pfdev)
> {
> - int err;
> -
> pfdev->rstc = devm_reset_control_array_get(pfdev->dev, false, true);
> if (IS_ERR(pfdev->rstc)) {
> dev_err(pfdev->dev, "get reset failed %ld\n", PTR_ERR(pfdev->rstc));
> return PTR_ERR(pfdev->rstc);
> }
>
> - err = reset_control_deassert(pfdev->rstc);
> - if (err)
> - return err;
> -
> - return 0;
> + return reset_control_deassert(pfdev->rstc);
> }
>
> static void panfrost_reset_fini(struct panfrost_device *pfdev)
>