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

Jani Nikula jani.nikula at intel.com
Wed Apr 24 11:10:58 UTC 2024


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 at intel.com>
---
 drivers/gpu/drm/i915/display/dvo_tfp410.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 */
-- 
2.39.2



More information about the Intel-gfx mailing list