[PATCH 1/2] drm/udl: Fix off-by-one error in udl_get_edid()
Reza Arbab
arbab at linux.ibm.com
Fri Mar 22 20:56:12 UTC 2019
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 at 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
More information about the dri-devel
mailing list