[PATCH 3/6] drm/offdrm: Remove redundant else in atomic_check
From: Aditya Garg
Date: Tue Feb 25 2025 - 06:16:34 EST
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/ofdrm.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/tiny/ofdrm.c b/drivers/gpu/drm/tiny/ofdrm.c
index 13491c0e7..fc669ab1d 100644
--- a/drivers/gpu/drm/tiny/ofdrm.c
+++ b/drivers/gpu/drm/tiny/ofdrm.c
@@ -777,7 +777,8 @@ static int ofdrm_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;
if (new_fb->format != odev->format) {
--
2.43.0