]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/rockchip: vop: remove redundant condition check
authorLucas Stach <l.stach@pengutronix.de>
Fri, 7 Feb 2025 18:22:46 +0000 (19:22 +0100)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 10 Apr 2025 08:27:22 +0000 (10:27 +0200)
Instead of checking the same thing twice in a row, fold the second
condition into the first clause.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Andy Yan <andyshrk@163.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://lore.kernel.org/r/20250207182247.215537-1-l.stach@pengutronix.de
drivers/gpu/drm/rockchip/rockchip_drm_vop.c

index e3596e2b557d042dcc660adbed14a468f2b1d484..ba6b0528d1e5a493cdef85dd1ea258e70c31ccd5 100644 (file)
@@ -733,11 +733,10 @@ static void vop_crtc_atomic_disable(struct drm_crtc *crtc,
 
        WARN_ON(vop->event);
 
-       if (crtc->state->self_refresh_active)
+       if (crtc->state->self_refresh_active) {
                rockchip_drm_set_win_enabled(crtc, false);
-
-       if (crtc->state->self_refresh_active)
                goto out;
+       }
 
        mutex_lock(&vop->vop_lock);