msm_fb: HDMI: Fix EDID parsing logic for multiple data blocks

This change fixes a bug in EDID parsing logic when there are
more than one data blocks of the same type in the EDID data. With
this change, the starting offset used to scan for the next data
block, is computed correctly.

Change-Id: I5d09fe61be9f7c749197991f54e430ae3aaddbcb
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
diff --git a/drivers/video/msm/external_common.c b/drivers/video/msm/external_common.c
index 29d500a..0d2bfd8 100644
--- a/drivers/video/msm/external_common.c
+++ b/drivers/video/msm/external_common.c
@@ -1190,7 +1190,6 @@
 static void hdmi_edid_extract_extended_data_blocks(const uint8 *in_buf)
 {
 	uint8 len = 0;
-	uint8 const *prev_etag = in_buf;
 	uint32 start_offset = DBC_START_OFFSET;
 
 	/* A Tage code of 7 identifies extended data blocks */
@@ -1239,8 +1238,7 @@
 		}
 
 		/* There could be more that one extended data block */
-		start_offset = etag - prev_etag + len + 1;
-		prev_etag = etag;
+		start_offset = etag - in_buf + len + 1;
 		etag = hdmi_edid_find_block(in_buf, start_offset, 7, &len);
 	}
 }