Skip to content

Commit

Permalink
settings: Handle unhandled error
Browse files Browse the repository at this point in the history
There was a case when the return code was ignored. This commit
fixes it.

Signed-off-by: Lukasz Maciejonczyk <[email protected]>
  • Loading branch information
lmaciejonczyk authored and nashif committed Feb 3, 2021
1 parent 53b08ec commit 563c24f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions subsys/settings/src/settings_nvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,9 @@ static int settings_nvs_save(struct settings_store *cs, const char *name,
/* write the value */
rc = nvs_write(&cf->cf_nvs, write_name_id + NVS_NAME_ID_OFFSET,
value, val_len);
if (rc < 0) {
return rc;
}

/* write the name if required */
if (write_name) {
Expand Down

0 comments on commit 563c24f

Please sign in to comment.