From: Aditya Garg <gargaditya08@xxxxxxxx> Remove the redundant else statement from atomic_check since the previous if statement was returning if true. Signed-off-by: Aditya Garg <gargaditya08@xxxxxxxx> --- drivers/gpu/drm/ast/ast_mode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/ast/ast_mode.c b/drivers/gpu/drm/ast/ast_mode.c index 9d5321c81..3817d1e4c 100644 --- a/drivers/gpu/drm/ast/ast_mode.c +++ b/drivers/gpu/drm/ast/ast_mode.c @@ -610,9 +610,10 @@ static int ast_primary_plane_helper_atomic_check(struct drm_plane *plane, DRM_PLANE_NO_SCALING, DRM_PLANE_NO_SCALING, false, true); - if (ret) { + if (ret) return ret; - } else if (!new_plane_state->visible) { + + if (!new_plane_state->visible) { if (drm_WARN_ON(dev, new_plane_state->crtc)) /* cannot legally happen */ return -EINVAL; else -- 2.43.0