summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/omap_hsmmc.c
diff options
context:
space:
mode:
authorNikita Kiryanov <nikita@compulab.co.il>2012-12-03 02:19:42 +0000
committerTom Rini <trini@ti.com>2013-03-08 16:41:12 -0500
commit5964dadd0371238cbc91b1c2b6b24fd7d83833d8 (patch)
tree5855f4727ae61b2ea102b61afcab4001b4132c39 /drivers/mmc/omap_hsmmc.c
parentfa3a69289f95efc01db0b15df326884973e80156 (diff)
downloadtalos-obmc-uboot-5964dadd0371238cbc91b1c2b6b24fd7d83833d8.tar.gz
talos-obmc-uboot-5964dadd0371238cbc91b1c2b6b24fd7d83833d8.zip
omap_hsmmc: fix out of bounds array access
There are 3 MMC/SD/SDIO controllers in OMAP SoCs, but only 2 structs are defined for devices. This leads to data being written outside of array bounds on systems that use all 3 controllers. Update hsmmc_dev array to the correct size. Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Diffstat (limited to 'drivers/mmc/omap_hsmmc.c')
-rw-r--r--drivers/mmc/omap_hsmmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index afd9b30b51..23dcebdfff 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -44,7 +44,7 @@
static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size);
static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
unsigned int siz);
-static struct mmc hsmmc_dev[2];
+static struct mmc hsmmc_dev[3];
#if defined(CONFIG_OMAP44XX) && defined(CONFIG_TWL6030_POWER)
static void omap4_vmmc_pbias_config(struct mmc *mmc)
OpenPOWER on IntegriCloud