diff mbox series

[2/6] drm/cirrus-qemu: Remove redundant else in atomic_check

Message ID 088E1983-D311-4B75-B198-242A32DCA3B5@live.com (mailing list archive)
State New
Headers show
Series drm: remove redundant else across drivers | expand

Commit Message

Aditya Garg Feb. 25, 2025, 11:06 a.m. UTC
From: Aditya Garg <gargaditya08@live.com>

Remove the redundant else statement from atomic_check since the previous if
statement was returning if true.

Signed-off-by: Aditya Garg <gargaditya08@live.com>
---
 drivers/gpu/drm/tiny/cirrus-qemu.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

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);