diff mbox series

[1/4] drm/i915/dvo: return proper error code instead of magic -1

Message ID 20240424111101.1152824-1-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:10 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/dvo_tfp410.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/dvo_tfp410.c b/drivers/gpu/drm/i915/display/dvo_tfp410.c
index 0939e097f4f9..b36a526df52b 100644
--- a/drivers/gpu/drm/i915/display/dvo_tfp410.c
+++ b/drivers/gpu/drm/i915/display/dvo_tfp410.c
@@ -162,7 +162,7 @@  static int tfp410_getid(struct intel_dvo_device *dvo, int addr)
 	    tfp410_readb(dvo, addr+1, &ch2))
 		return ((ch2 << 8) & 0xFF00) | (ch1 & 0x00FF);
 
-	return -1;
+	return -EINVAL;
 }
 
 /* Ti TFP410 driver for chip on i2c bus */