lkml.org 
[lkml]   [2019]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/2] drm/udl: Fix off-by-one error in udl_get_edid()
Date
The loop which reads EDID extension blocks is off by one. Fix it.

Fixes: 75c65ee20ade ("drm/udl: Reading all edid blocks in DRM/UDL driver")
Signed-off-by: Reza Arbab <arbab@linux.ibm.com>
---
drivers/gpu/drm/udl/udl_connector.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/udl/udl_connector.c b/drivers/gpu/drm/udl/udl_connector.c
index 66885c24590f..820543415a78 100644
--- a/drivers/gpu/drm/udl/udl_connector.c
+++ b/drivers/gpu/drm/udl/udl_connector.c
@@ -71,7 +71,7 @@ static bool udl_get_edid(struct udl_device *udl, u8 **result_buff,
memcpy(buff_ptr, block_buff, EDID_LENGTH);
kfree(block_buff);
buff_ptr += EDID_LENGTH;
- for (i = 1; i < extensions; ++i) {
+ for (i = 1; i <= extensions; ++i) {
if (udl_get_edid_block(udl, i, buff_ptr)) {
buff_ptr += EDID_LENGTH;
} else {
--
1.8.3.1
\
 
 \ /
  Last update: 2019-03-22 21:57    [W:0.167 / U:0.332 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site