2022-08-29 13:36:02

by Maxime Ripard

[permalink] [raw]
Subject: [PATCH v2 39/41] drm/sun4i: tv: Rename error label

The other error labels in sun4i_tv_bind() are named after the task they

perform (err_disable_clk to call clk_disable_unprepare for example).



However, the err_cleanup_connector is named after the calling site

(drm_connector_init failing) and will actually cleanup the encoder. Let's

rename it to err_cleanup_encoder to be consistent.



Signed-off-by: Maxime Ripard <[email protected]>

Reviewed-by: Jernej Skrabec <[email protected]>



diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c

index 6d7e1d51569a..ad6a3739bfa9 100644

--- a/drivers/gpu/drm/sun4i/sun4i_tv.c

+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c

@@ -580,7 +580,7 @@ static int sun4i_tv_bind(struct device *dev, struct device *master,

if (ret) {

dev_err(dev,

"Couldn't initialise the Composite connector\n");

- goto err_cleanup_connector;

+ goto err_cleanup_encoder;

}

tv->connector.interlace_allowed = true;



@@ -588,7 +588,7 @@ static int sun4i_tv_bind(struct device *dev, struct device *master,



return 0;



-err_cleanup_connector:

+err_cleanup_encoder:

drm_encoder_cleanup(&tv->encoder);

err_disable_clk:

clk_disable_unprepare(tv->clk);



--

b4 0.10.0-dev-65ba7


2022-09-07 08:51:50

by Maxime Ripard

[permalink] [raw]
Subject: Re: (subset) [PATCH v2 39/41] drm/sun4i: tv: Rename error label

On Mon, 29 Aug 2022 15:11:53 +0200, Maxime Ripard wrote:
> The other error labels in sun4i_tv_bind() are named after the task they
> perform (err_disable_clk to call clk_disable_unprepare for example).
>
> However, the err_cleanup_connector is named after the calling site
> (drm_connector_init failing) and will actually cleanup the encoder. Let's
> rename it to err_cleanup_encoder to be consistent.
>
> [...]

Applied to drm/drm-misc (drm-misc-next).

Thanks!
Maxime