diff options
author | Sandor Yu <R01008@freescale.com> | 2015-04-14 13:53:41 +0800 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2015-09-17 09:23:45 -0500 |
commit | ff15f1a722bbfc5ba6808f7a22345621422baad7 (patch) | |
tree | e233f56fcf83639e7cd0d086076bfe4d2e1ae4db /drivers/video | |
parent | 3c3c7596db02d2080f25b87e91bcdc94de2b8216 (diff) |
MLK-11177: mxc edid: Skip extension edid block read if more than 3
HDMI driver allocate 512 bytes memory to save edid data.
so mxc edid MAX support 3 extension block.
Skip extension edid block read if extension block num more than 3.
Signed-off-by: Sandor Yu <R01008@freescale.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/mxc/mxc_edid.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/video/mxc/mxc_edid.c b/drivers/video/mxc/mxc_edid.c index d791bfea5609..998b2d4b7b36 100644 --- a/drivers/video/mxc/mxc_edid.c +++ b/drivers/video/mxc/mxc_edid.c @@ -1,5 +1,5 @@ /* - * Copyright 2009-2014 Freescale Semiconductor, Inc. All Rights Reserved. + * Copyright 2009-2015 Freescale Semiconductor, Inc. All Rights Reserved. */ /* @@ -744,7 +744,10 @@ int mxc_edid_read(struct i2c_adapter *adp, unsigned short addr, /* FIXME: mxc_edid_readsegblk() won't read more than 2 blocks * and the for-loop will read past the end of the buffer! :-( */ - BUG_ON(extblknum > 3); + if (extblknum > 3) { + WARN_ON(true); + return -EINVAL; + } /* need read segment block? */ if (extblknum > 1) { |