[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200508075210.GA8789@ravnborg.org>
Date: Fri, 8 May 2020 09:52:10 +0200
From: Sam Ravnborg <sam@...nborg.org>
To: Bernard <bernard@...o.com>
Cc: Inki Dae <inki.dae@...sung.com>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Seung-Woo Kim <sw0312.kim@...sung.com>,
Kyungmin Park <kyungmin.park@...sung.com>,
David Airlie <airlied@...ux.ie>,
Daniel Vetter <daniel@...ll.ch>, Kukjin Kim <kgene@...nel.org>,
Krzysztof Kozlowski <krzk@...nel.org>,
dri-devel@...ts.freedesktop.org,
linux-arm-kernel@...ts.infradead.org,
linux-samsung-soc@...r.kernel.org, linux-kernel@...r.kernel.org,
opensource.kernel@...o.com
Subject: Re: [PATCH] drm/exynos: remove no need devm_kfree in probe [re-send,
welcome any comments]
Hi Bernard.
On Wed, May 06, 2020 at 08:49:03PM +0800, Bernard wrote:
> Remove no need devm_kfree in probe.
> The change is to make the code a bit more readable
>
> Signed-off-by: Bernard Zhao <bernard@...o.com>
Could you take a closer look and fix similar patterns
in the rest of the driver?
For example in exynos_dpi_probe()
Is would be nice to only have to review for this
type of changes once, so one patch-set is preferred
over single patches over time.
You can add:
Reviewed-by: Sam Ravnborg <sam@...nborg.org>
to this patch when you re-send a new series.
Thanks,
Sam
> ---
> drivers/gpu/drm/exynos/exynos_drm_dpi.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/exynos/exynos_drm_dpi.c b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> index 43fa0f26c052..e06f7d7a6695 100644
> --- a/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> +++ b/drivers/gpu/drm/exynos/exynos_drm_dpi.c
> @@ -181,10 +181,8 @@ static int exynos_dpi_parse_dt(struct exynos_dpi *ctx)
> return -ENOMEM;
>
> ret = of_get_videomode(dn, vm, 0);
> - if (ret < 0) {
> - devm_kfree(dev, vm);
> + if (ret < 0)
> return ret;
> - }
>
> ctx->vm = vm;
>
> @@ -233,10 +231,8 @@ struct drm_encoder *exynos_dpi_probe(struct device *dev)
> ctx->dev = dev;
>
> ret = exynos_dpi_parse_dt(ctx);
> - if (ret < 0) {
> - devm_kfree(dev, ctx);
> - return NULL;
> - }
> + if (ret < 0)
> + return ERR_PTR(ret);
>
> if (ctx->panel_node) {
> ctx->panel = of_drm_find_panel(ctx->panel_node);
> --
> 2.26.2
>
>
> [re-send, welcome any comments]
> Regards,
> Bernard
>
>
>
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Powered by blists - more mailing lists