mb/google/poppy/var/nami: Ensure SPD index is non-zero
commitfb5a83df3c557c9105b17b49e08219a61155c520
authorJacob Garber <jgarber1@ualberta.ca>
Mon, 3 Jun 2019 23:17:11 +0000 (3 17:17 -0600)
committerMartin Roth <martinroth@google.com>
Fri, 14 Jun 2019 19:56:38 +0000 (14 19:56 +0000)
tree5d7856d66e298d074005cf28604c989a277a7878
parent8cf8a6375e5a9acfe418d3f48a9942d7356aac41
mb/google/poppy/var/nami: Ensure SPD index is non-zero

Memory id's are 1-indexed for DDR4, so we need to check that the SPD
index is non-zero before converting it to the 0-indexed value in the
bitmap.

Change-Id: Icc542239d91c39b89c23f31856c28e7c20b2fc4d
Signed-off-by: Jacob Garber <jgarber1@ualberta.ca>
Found-by: Coverity CID 1387028
Reviewed-on: https://review.coreboot.org/c/coreboot/+/33183
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
src/mainboard/google/poppy/variants/nami/memory.c