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:
Lukasz Maciejonczyk 2021-02-02 12:56:03 +01:00 committed by Anas Nashif
parent 53b08ecbfd
commit 563c24fb78

View file

@ -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) {