settings: Handle unhandled error
There was a case when the return code was ignored. This commit fixes it. Signed-off-by: Lukasz Maciejonczyk <lukasz.maciejonczyk@nordicsemi.no>
This commit is contained in:
parent
53b08ecbfd
commit
563c24fb78
1 changed files with 3 additions and 0 deletions
|
|
@ -213,6 +213,9 @@ static int settings_nvs_save(struct settings_store *cs, const char *name,
|
||||||
/* write the value */
|
/* write the value */
|
||||||
rc = nvs_write(&cf->cf_nvs, write_name_id + NVS_NAME_ID_OFFSET,
|
rc = nvs_write(&cf->cf_nvs, write_name_id + NVS_NAME_ID_OFFSET,
|
||||||
value, val_len);
|
value, val_len);
|
||||||
|
if (rc < 0) {
|
||||||
|
return rc;
|
||||||
|
}
|
||||||
|
|
||||||
/* write the name if required */
|
/* write the name if required */
|
||||||
if (write_name) {
|
if (write_name) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue