diff options
author | Dario Binacchi <dario.binacchi@amarulasolutions.com> | 2023-12-07 17:10:43 +0100 |
---|---|---|
committer | Robert Foss <rfoss@kernel.org> | 2023-12-15 15:08:58 +0100 |
commit | 045159f5018eee5fd2b502dbbfdc31985ac8f516 (patch) | |
tree | 0cc791a6b1ba5fd81b654ee139938078fbe58d4b /drivers/gpu/drm/bridge | |
parent | 9203f67272531ee17d58966e51f086e9a5deb840 (diff) | |
download | linux-stable-045159f5018eee5fd2b502dbbfdc31985ac8f516.tar.gz linux-stable-045159f5018eee5fd2b502dbbfdc31985ac8f516.tar.bz2 linux-stable-045159f5018eee5fd2b502dbbfdc31985ac8f516.zip |
drm/bridge: samsung-dsim: check the return value only if necessary
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>
Signed-off-by: Robert Foss <rfoss@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20231207161056.183442-1-dario.binacchi@amarulasolutions.com
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r-- | drivers/gpu/drm/bridge/samsung-dsim.c | 8 |
1 files 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; |