Skip to content

Commit 84572a6

Browse files
cdesjardinscarlescufi
authored andcommitted
drivers: i2s: Do not ignore the return value from queue_put.
If failure occurs the caller can free the buffer. Signed-off-by: Chris Desjardins <chris@arch-embedded.com>
1 parent 34f09e3 commit 84572a6

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/i2s/i2s_ll_stm32.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -480,9 +480,7 @@ static int i2s_stm32_write(const struct device *dev, void *mem_block,
480480
}
481481

482482
/* Add data to the end of the TX queue */
483-
queue_put(&dev_data->tx.mem_block_queue, mem_block, size);
484-
485-
return 0;
483+
return queue_put(&dev_data->tx.mem_block_queue, mem_block, size);
486484
}
487485

488486
static const struct i2s_driver_api i2s_stm32_driver_api = {

0 commit comments

Comments
 (0)