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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
 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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux