|
@@ -664,7 +664,7 @@ static int update_flash_db(void)
|
|
|
db_set_64(db, &os_area_db_id_rtc_diff, saved_params.rtc_diff);
|
|
|
|
|
|
count = os_area_flash_write(db, sizeof(struct os_area_db), pos);
|
|
|
- if (count < sizeof(struct os_area_db)) {
|
|
|
+ if (count < 0 || count < sizeof(struct os_area_db)) {
|
|
|
pr_debug("%s: os_area_flash_write failed %zd\n", __func__,
|
|
|
count);
|
|
|
error = count < 0 ? count : -EIO;
|