diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:22:04 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-15 20:50:28 -0400 |
commit | 98b5755fb0484ac575b66784865bde2b30ea1d87 (patch) | |
tree | a193900623bfc951c11239daf3409be84622a79c /env/eeprom.c | |
parent | ac358beb85362fb2fac47aaec40a7e1bca49656c (diff) | |
download | u-boot-98b5755fb0484ac575b66784865bde2b30ea1d87.tar.gz |
env: Drop unused env_ptr variables
This variable is declared as a global in most environment location
drivers. But it is not used outside the drivers and most of the
declarations are unnecessary.
Also some drivers call free() on env_ptr which seems wrong since it is
not in the heap.
Drop the variable where possible, and all calls to free().
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env/eeprom.c')
-rw-r--r-- | env/eeprom.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/env/eeprom.c b/env/eeprom.c index 2c795b9236..39adccabbe 100644 --- a/env/eeprom.c +++ b/env/eeprom.c @@ -21,8 +21,6 @@ DECLARE_GLOBAL_DATA_PTR; -env_t *env_ptr; - static int eeprom_bus_read(unsigned dev_addr, unsigned offset, uchar *buffer, unsigned cnt) { @@ -196,8 +194,6 @@ static int env_eeprom_save(void) char flag_obsolete = OBSOLETE_FLAG; #endif - BUG_ON(env_ptr != NULL); - rc = env_export(&env_new); if (rc) return rc; |