Commit 99f4a078 authored by Haiyue Wang's avatar Haiyue Wang Committed by Benjamin Cabé
Browse files

drivers: eeprom: stm32: simplify write error handling

Remove the extra unlock and value return, just print the error code when
failed to do DATAEEPROM_Lock().

Signed-off-by: default avatarHaiyue Wang <haiyuewa@163.com>
parent 1446416b
Loading
Loading
Loading
Loading
+0 −2
Changes for drivers/eeprom/eeprom_stm32.c: 0 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -91,8 +91,6 @@ static int eeprom_stm32_write(const struct device *dev, off_t offset,
	ret = HAL_FLASHEx_DATAEEPROM_Lock();
	if (ret) {
		LOG_ERR("failed to lock EEPROM (err %d)", ret);
		k_mutex_unlock(&lock);
		return ret;
	}

	k_mutex_unlock(&lock);