mec1322: Fix uninitialized variable.

This patch fixes a reported error for an uninitialized return variable.

BUG=none
TEST=Build and Test EC.
BRANCH=none

Change-Id: I43a6678049070ef1ee6c71dfbac1fcb21de88957
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/317352
Commit-Ready: Divya Jyothi <divya.jyothi@intel.com>
Tested-by: Divya Jyothi <divya.jyothi@intel.com>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Shaunak Saha
2015-12-09 22:39:27 -08:00
committed by chrome-bot
parent d270d40d10
commit eac6480a2c

View File

@@ -36,7 +36,8 @@ struct flash_wp_state {
*/
int flash_physical_read(int offset, int size, char *data)
{
int ret, i, read_size;
int ret = EC_SUCCESS;
int i, read_size;
for (i = 0; i < size; i += read_size) {
read_size = MIN((size - i), SPI_FLASH_MAX_READ_SIZE);
@@ -63,7 +64,8 @@ int flash_physical_read(int offset, int size, char *data)
*/
int flash_physical_write(int offset, int size, const char *data)
{
int ret, i, write_size;
int ret = EC_SUCCESS;
int i, write_size;
if (entire_flash_locked)
return EC_ERROR_ACCESS_DENIED;