diff options
author | Alexandru Gagniuc <alexandrux.gagniuc@intel.com> | 2016-05-16 16:06:07 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@chromium.org> | 2016-05-19 18:26:17 +0200 |
commit | 63e7b5b8a7dc69d1546ccd0d2ee4fcce8a2cc67d (patch) | |
tree | 91da1c1495d98050272e80cc265b065aaf57712e /src/lib/ramtest.c | |
parent | 87c6097c8f3ec812101f302ce98d0e6a53c25bab (diff) |
lib/timestamp: Do not initialize cache in timestamp_cache_get()
timestamp_cache_get() would call timestamp_cache_init() whenever it
found a timestamp cache in the TIMESTAMP_CACHE_UNINITIALIZED state.
That means that timestamp_cache_get() will never reurn a cache in the
uninitialized state.
However, timestamp_init() checks against the uninitialized state, as
it does not expect timestamp_cache_get() to perform any initialization.
As a result, the conditional branch can never be reached.
Simply remove the timestamp_cache_init() call from timestamp_cache_get().
Change-Id: I573ffbf948b69948a3b383fa3bc94382f205b8f8
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14861
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src/lib/ramtest.c')
0 files changed, 0 insertions, 0 deletions