mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-09 09:01:35 +00:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user