Skip to content

Commit 997f6d4

Browse files
ndrs-pstkartben
authored andcommitted
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 <[email protected]>
1 parent 3a67013 commit 997f6d4

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

drivers/eeprom/eeprom_at2x.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,6 @@ static int eeprom_at25_read(const struct device *dev, off_t offset, void *buf,
419419
size_t len)
420420
{
421421
const struct eeprom_at2x_config *config = dev->config;
422-
struct eeprom_at2x_data *data = dev->data;
423422
size_t cmd_len = 1 + config->addr_width / 8;
424423
uint8_t cmd[4] = { EEPROM_AT25_READ, 0, 0, 0 };
425424
uint8_t *paddr;
@@ -474,7 +473,6 @@ static int eeprom_at25_read(const struct device *dev, off_t offset, void *buf,
474473
err = eeprom_at25_wait_for_idle(dev);
475474
if (err) {
476475
LOG_ERR("EEPROM idle wait failed (err %d)", err);
477-
k_mutex_unlock(&data->lock);
478476
return err;
479477
}
480478

0 commit comments

Comments
 (0)