samples: flash_shell: Fix Coverity issue 220540
Fix possible Uninitialized 'ret' value. Fixes #34001 Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit is contained in:
parent
f6f951cc17
commit
3b84b645db
1 changed files with 1 additions and 1 deletions
|
@ -229,7 +229,7 @@ static int do_write(const struct shell *shell, off_t offset, uint8_t *buf,
|
|||
static int do_write_unaligned(const struct shell *shell, off_t offset, uint8_t *buf,
|
||||
size_t len, bool read_back)
|
||||
{
|
||||
int ret;
|
||||
int ret = 0;
|
||||
size_t page_size = flash_get_write_block_size(flash_device);
|
||||
size_t size_before = offset % page_size;
|
||||
size_t size_after = page_size - ((size_before + len) % page_size);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue