drivers/storage: Fix array references

Fix bug detected by coverity to handle the zero capacity case.  Specific

* Reduce loop count by one to handle zero capacity case
* Use structure instead of dual arrays
* Move structures into display_capacity routine

Coverity Issues:
* 1374931
* 1374932
* 1374933
* 1374934

TEST=Build and run on Galileo Gen2

Change-Id: Ie5c96e78417b667438a00ee22c70894a00d13291
Signed-off-by: Lee Leahy <>
Tested-by: build bot (Jenkins) <>
Reviewed-by: Aaron Durbin <>
1 file changed