summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2014-02-25 12:44:13 -0500
committerTom Rini <trini@ti.com>2014-02-25 13:55:49 -0500
commita7e8c15f71456d55ccb27f843862af03a00e0957 (patch)
tree67028131161fdded15fd8625aabf3de03cc98b00 /common
parent4c48cfb58b66924c52cd5c5d960e04cf6d7064ca (diff)
parent91d7746df89f858548fe535137b4b185a6a76d59 (diff)
downloadtalos-obmc-uboot-a7e8c15f71456d55ccb27f843862af03a00e0957.tar.gz
talos-obmc-uboot-a7e8c15f71456d55ccb27f843862af03a00e0957.zip
Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx
With this, fixup a trivial build error of get_effective_memsize needing to be updated in the new board/freescale/p1010rdb/spl.c Signed-off-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'common')
-rw-r--r--common/env_sf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/common/env_sf.c b/common/env_sf.c
index 9f806fb090..be270f21bc 100644
--- a/common/env_sf.c
+++ b/common/env_sf.c
@@ -299,13 +299,16 @@ int saveenv(void)
void env_relocate_spec(void)
{
- char buf[CONFIG_ENV_SIZE];
int ret;
+ char *buf = NULL;
+ buf = (char *)malloc(CONFIG_ENV_SIZE);
env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS,
CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE);
if (!env_flash) {
set_default_env("!spi_flash_probe() failed");
+ if (buf)
+ free(buf);
return;
}
@@ -321,6 +324,8 @@ void env_relocate_spec(void)
gd->env_valid = 1;
out:
spi_flash_free(env_flash);
+ if (buf)
+ free(buf);
env_flash = NULL;
}
#endif
OpenPOWER on IntegriCloud