diff mbox series

[4/4] drm/i915/fb: return proper error codes instead of magic -1

Message ID 20240424111101.1152824-4-jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/4] drm/i915/dvo: return proper error code instead of magic -1 | expand

Commit Message

Jani Nikula April 24, 2024, 11:11 a.m. UTC
Use proper negative error codes intead of magic -1. Don't set a bad
example, as -1 is -EPERM.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_fb.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_fb.c b/drivers/gpu/drm/i915/display/intel_fb.c
index 86b443433e8b..705f97ef677b 100644
--- a/drivers/gpu/drm/i915/display/intel_fb.c
+++ b/drivers/gpu/drm/i915/display/intel_fb.c
@@ -563,15 +563,15 @@  static bool intel_fb_is_gen12_ccs_aux_plane(const struct drm_framebuffer *fb, in
  * @fb: Framebuffer
  *
  * Returns:
- * Returns the index of the color clear plane for @fb, or -1 if @fb is not a
- * framebuffer using a render compression/color clear modifier.
+ * Returns the index of the color clear plane for @fb, or -EINVAL if @fb is not
+ * a framebuffer using a render compression/color clear modifier.
  */
 int intel_fb_rc_ccs_cc_plane(const struct drm_framebuffer *fb)
 {
 	const struct intel_modifier_desc *md = lookup_modifier(fb->modifier);
 
 	if (!md->ccs.cc_planes)
-		return -1;
+		return -EINVAL;
 
 	drm_WARN_ON_ONCE(fb->dev, hweight8(md->ccs.cc_planes) > 1);