summaryrefslogtreecommitdiff
path: root/drivers/video/ipu_disp.c
diff options
context:
space:
mode:
authorPeng Fan <Peng.Fan@freescale.com>2015-11-26 14:19:44 +0800
committerPeng Fan <Peng.Fan@freescale.com>2015-11-27 09:54:08 +0800
commit6cdc3c37b96de9e9f42b79ccfeceda50518a9344 (patch)
tree1995b35fcc73d3c50a320d5a95ef2676a13aed6b /drivers/video/ipu_disp.c
parente3618dfec24f62671685f834c14b12d9fd5e944a (diff)
downloadu-boot-imx-6cdc3c37b96de9e9f42b79ccfeceda50518a9344.zip
u-boot-imx-6cdc3c37b96de9e9f42b79ccfeceda50518a9344.tar.gz
u-boot-imx-6cdc3c37b96de9e9f42b79ccfeceda50518a9344.tar.bz2
MLK-11897 video: ipu: fix out of bounds access
We need to access reg stp_rep9, but not stp_rep[(9 - 1) / 2]. If using "__raw_writel(0, DI_STP_REP(disp, 9))", this will exceeds the size of stp_rep array. Acked-by: Liu Ying <Ying.Liu@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Diffstat (limited to 'drivers/video/ipu_disp.c')
-rw-r--r--drivers/video/ipu_disp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/ipu_disp.c b/drivers/video/ipu_disp.c
index 5a8727f..e872500 100644
--- a/drivers/video/ipu_disp.c
+++ b/drivers/video/ipu_disp.c
@@ -1129,7 +1129,7 @@ int32_t ipu_init_sync_panel(int disp, uint32_t pixel_clk,
reg &= 0x0000FFFF;
__raw_writel(reg, DI_STP_REP(disp, 6));
__raw_writel(0, DI_STP_REP(disp, 7));
- __raw_writel(0, DI_STP_REP(disp, 9));
+ __raw_writel(0, DI_STP_REP9(disp));
/* Init template microcode */
if (disp) {