int *length, int *idx)
{
u8 *displayid = drm_find_edid_extension(edid, DISPLAYID_EXT);
+ int ret;
if (!displayid)
return NULL;
*length = EDID_LENGTH;
*idx = 1;
+ ret = validate_displayid(displayid, *length, *idx);
+ if (ret)
+ return NULL;
+
return displayid;
}
static u8 *drm_find_cea_extension(const struct edid *edid)
{
- int ret;
int length, idx;
struct displayid_block *block;
u8 *cea;
if (!displayid)
return NULL;
- ret = validate_displayid(displayid, length, idx);
- if (ret)
- return NULL;
-
idx += sizeof(struct displayid_hdr);
for_each_displayid_db(displayid, block, idx, length) {
if (block->tag == DATA_BLOCK_CTA) {
struct edid *edid)
{
u8 *displayid;
- int ret;
int length, idx;
struct displayid_block *block;
int num_modes = 0;
if (!displayid)
return 0;
- ret = validate_displayid(displayid, length, idx);
- if (ret)
- return 0;
-
idx += sizeof(struct displayid_hdr);
for_each_displayid_db(displayid, block, idx, length) {
switch (block->tag) {
struct displayid_block *block;
int ret;
- ret = validate_displayid(displayid, length, idx);
- if (ret)
- return ret;
-
idx += sizeof(struct displayid_hdr);
for_each_displayid_db(displayid, block, idx, length) {
DRM_DEBUG_KMS("block id 0x%x, rev %d, len %d\n",