]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/bridge: samsung-dsim: check the return value only if necessary
authorDario Binacchi <dario.binacchi@amarulasolutions.com>
Thu, 7 Dec 2023 16:10:43 +0000 (17:10 +0100)
committerRobert Foss <rfoss@kernel.org>
Fri, 15 Dec 2023 14:08:58 +0000 (15:08 +0100)
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
drivers/gpu/drm/bridge/samsung-dsim.c

index be5914caa17d546601d11719976161624c1a420f..98cd589e4427edf1f1c3ac1f04770b90dd773ccc 100644 (file)
@@ -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;