* [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary
@ 2023-12-07 16:10 Dario Binacchi
2023-12-07 16:42 ` Frieder Schrempf
2023-12-15 14:12 ` Robert Foss
0 siblings, 2 replies; 3+ messages in thread
From: Dario Binacchi @ 2023-12-07 16:10 UTC (permalink / raw)
To: linux-kernel
Cc: Dario Binacchi, Andrzej Hajda, Daniel Vetter, David Airlie,
Inki Dae, Jagan Teki, Jernej Skrabec, Jonas Karlman,
Laurent Pinchart, Maarten Lankhorst, Marek Szyprowski,
Maxime Ripard, Neil Armstrong, Robert Foss, Thomas Zimmermann,
dri-devel
It was useless to check again the "ret" variable if the function
register_host() was not called.
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
drivers/gpu/drm/bridge/samsung-dsim.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
index be5914caa17d..98cd589e4427 100644
--- a/drivers/gpu/drm/bridge/samsung-dsim.c
+++ b/drivers/gpu/drm/bridge/samsung-dsim.c
@@ -2020,11 +2020,11 @@ int samsung_dsim_probe(struct platform_device *pdev)
else
dsi->bridge.timings = &samsung_dsim_bridge_timings_de_high;
- if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host)
+ if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) {
ret = dsi->plat_data->host_ops->register_host(dsi);
-
- if (ret)
- goto err_disable_runtime;
+ if (ret)
+ goto err_disable_runtime;
+ }
return 0;
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary
2023-12-07 16:10 [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary Dario Binacchi
@ 2023-12-07 16:42 ` Frieder Schrempf
2023-12-15 14:12 ` Robert Foss
1 sibling, 0 replies; 3+ messages in thread
From: Frieder Schrempf @ 2023-12-07 16:42 UTC (permalink / raw)
To: Dario Binacchi, linux-kernel
Cc: Maxime Ripard, Neil Armstrong, Robert Foss, Andrzej Hajda,
Jonas Karlman, Thomas Zimmermann, dri-devel, Jernej Skrabec,
Jagan Teki, Marek Szyprowski, Laurent Pinchart
On 07.12.23 17:10, Dario Binacchi wrote:
> It was useless to check again the "ret" variable if the function
> register_host() was not called.
>
> Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>
> ---
>
> drivers/gpu/drm/bridge/samsung-dsim.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c
> index be5914caa17d..98cd589e4427 100644
> --- a/drivers/gpu/drm/bridge/samsung-dsim.c
> +++ b/drivers/gpu/drm/bridge/samsung-dsim.c
> @@ -2020,11 +2020,11 @@ int samsung_dsim_probe(struct platform_device *pdev)
> else
> dsi->bridge.timings = &samsung_dsim_bridge_timings_de_high;
>
> - if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host)
> + if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) {
> ret = dsi->plat_data->host_ops->register_host(dsi);
> -
> - if (ret)
> - goto err_disable_runtime;
> + if (ret)
> + goto err_disable_runtime;
> + }
>
> return 0;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary
2023-12-07 16:10 [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary Dario Binacchi
2023-12-07 16:42 ` Frieder Schrempf
@ 2023-12-15 14:12 ` Robert Foss
1 sibling, 0 replies; 3+ messages in thread
From: Robert Foss @ 2023-12-15 14:12 UTC (permalink / raw)
To: linux-kernel, Dario Binacchi
Cc: Jernej Skrabec, Laurent Pinchart, David Airlie, Daniel Vetter,
Neil Armstrong, Maxime Ripard, Jonas Karlman, dri-devel,
Marek Szyprowski, Inki Dae, Thomas Zimmermann, Jagan Teki,
Maarten Lankhorst, Andrzej Hajda
On Thu, 7 Dec 2023 17:10:43 +0100, Dario Binacchi wrote:
> It was useless to check again the "ret" variable if the function
> register_host() was not called.
>
>
Applied, thanks!
[1/1] drm/bridge: samsung-dsim: check the return value only if necessary
https://cgit.freedesktop.org/drm/drm-misc/commit/?id=045159f5018e
Rob
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-12-15 14:12 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-07 16:10 [PATCH] drm/bridge: samsung-dsim: check the return value only if necessary Dario Binacchi
2023-12-07 16:42 ` Frieder Schrempf
2023-12-15 14:12 ` Robert Foss
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®