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: Haiyue Wang <haiyuewa@163.com>
This commit is contained in:
parent
1446416b6d
commit
99f4a078d2
1 changed files with 0 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue