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/tiny/cirrus-qemu.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tiny/cirrus-qemu.c b/drivers/gpu/drm/tiny/cirrus-qemu.c index 52ec1e4ea..e696531b6 100644 --- a/drivers/gpu/drm/tiny/cirrus-qemu.c +++ b/drivers/gpu/drm/tiny/cirrus-qemu.c @@ -359,7 +359,8 @@ static int cirrus_primary_plane_helper_atomic_check(struct drm_plane *plane, false, false); if (ret) return ret; - else if (!new_plane_state->visible) + + if (!new_plane_state->visible) return 0; pitch = cirrus_pitch(fb); @@ -367,7 +368,8 @@ static int cirrus_primary_plane_helper_atomic_check(struct drm_plane *plane, /* validate size constraints */ if (pitch > CIRRUS_MAX_PITCH) return -EINVAL; - else if (pitch * fb->height > CIRRUS_VRAM_SIZE) + + if (pitch * fb->height > CIRRUS_VRAM_SIZE) return -EINVAL; new_primary_plane_state->format = cirrus_format(fb); -- 2.43.0