diff options
author | Navneet Kumar <navneetk@nvidia.com> | 2017-05-23 21:42:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-30 22:35:38 -0400 |
commit | 39f5ad0b2a2566c4009b808163476f1cdbea5936 (patch) | |
tree | 8a177acbf99546fae412aec9a68eb469dd5b5831 /drivers/video/tegra/dc/dsi.c | |
parent | b88c52981ea0c7c92e07198efe1a0a0805ab9028 (diff) |
video: tegra: dsi: fix out of bounds array access
fix out of bounds access on dsi_io_padctrl
Change-Id: Ie3687f0d22a71b59ddb52ffb191b922d7319f010
Signed-off-by: Navneet Kumar <navneetk@nvidia.com>
Reviewed-on: http://git-master/r/1488380
(cherry picked from commit 19c41f5276a203667615212341d2fe4fc72d93c4)
Reviewed-on: https://git-master/r/1510960
Reviewed-by: Samuel Payne <spayne@nvidia.com>
Tested-by: Samuel Payne <spayne@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Yan <byan@nvidia.com>
Diffstat (limited to 'drivers/video/tegra/dc/dsi.c')
-rw-r--r-- | drivers/video/tegra/dc/dsi.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/video/tegra/dc/dsi.c b/drivers/video/tegra/dc/dsi.c index d29048265..2ce6f841b 100644 --- a/drivers/video/tegra/dc/dsi.c +++ b/drivers/video/tegra/dc/dsi.c | |||
@@ -4498,18 +4498,12 @@ static int _tegra_dc_dsi_init(struct tegra_dc *dc) | |||
4498 | */ | 4498 | */ |
4499 | if (!dsi->info.ganged_type && !dsi->info.dsi_csi_loopback && | 4499 | if (!dsi->info.ganged_type && !dsi->info.dsi_csi_loopback && |
4500 | (dsi->info.controller_vs >= DSI_VS_1)) { | 4500 | (dsi->info.controller_vs >= DSI_VS_1)) { |
4501 | if ((dsi->info.dpd_dsi_pads & DSI_DPD_EN) && | 4501 | int i; |
4502 | dsi->dsi_io_padctrl[0]) | 4502 | for (i = 0; i < MAX_DSI_INSTANCE; i++) { |
4503 | padctrl_power_disable(dsi->dsi_io_padctrl[0]); | 4503 | if ((dsi->info.dpd_dsi_pads & DSI_DPD_EN(i)) && |
4504 | if ((dsi->info.dpd_dsi_pads & DSIB_DPD_EN) && | 4504 | dsi->dsi_io_padctrl[i]) |
4505 | dsi->dsi_io_padctrl[1]) | 4505 | padctrl_power_disable(dsi->dsi_io_padctrl[i]); |
4506 | padctrl_power_disable(dsi->dsi_io_padctrl[1]); | 4506 | } |
4507 | if ((dsi->info.dpd_dsi_pads & DSIC_DPD_EN) && | ||
4508 | dsi->dsi_io_padctrl[2]) | ||
4509 | padctrl_power_disable(dsi->dsi_io_padctrl[2]); | ||
4510 | if ((dsi->info.dpd_dsi_pads & DSID_DPD_EN) && | ||
4511 | dsi->dsi_io_padctrl[3]) | ||
4512 | padctrl_power_disable(dsi->dsi_io_padctrl[3]); | ||
4513 | } | 4507 | } |
4514 | 4508 | ||
4515 | /* | 4509 | /* |