drivers: eeprom: at2x: remove orphaned k_mutex_unlock
Remove orphaned `k_mutex_unlock` in `eeprom_at25_read` as the lock/unlock pair is handled in `eeprom_at2x_read` instead. Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
This commit is contained in:
parent
3a67013ef1
commit
997f6d4949
1 changed files with 0 additions and 2 deletions
|
|
@ -419,7 +419,6 @@ static int eeprom_at25_read(const struct device *dev, off_t offset, void *buf,
|
||||||
size_t len)
|
size_t len)
|
||||||
{
|
{
|
||||||
const struct eeprom_at2x_config *config = dev->config;
|
const struct eeprom_at2x_config *config = dev->config;
|
||||||
struct eeprom_at2x_data *data = dev->data;
|
|
||||||
size_t cmd_len = 1 + config->addr_width / 8;
|
size_t cmd_len = 1 + config->addr_width / 8;
|
||||||
uint8_t cmd[4] = { EEPROM_AT25_READ, 0, 0, 0 };
|
uint8_t cmd[4] = { EEPROM_AT25_READ, 0, 0, 0 };
|
||||||
uint8_t *paddr;
|
uint8_t *paddr;
|
||||||
|
|
@ -474,7 +473,6 @@ static int eeprom_at25_read(const struct device *dev, off_t offset, void *buf,
|
||||||
err = eeprom_at25_wait_for_idle(dev);
|
err = eeprom_at25_wait_for_idle(dev);
|
||||||
if (err) {
|
if (err) {
|
||||||
LOG_ERR("EEPROM idle wait failed (err %d)", err);
|
LOG_ERR("EEPROM idle wait failed (err %d)", err);
|
||||||
k_mutex_unlock(&data->lock);
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue