Skip to content

Commit 76a160b

Browse files
Andrew Boienashif
authored andcommitted
i2s_handlers: fix incorrect k_mem_slab_free arg
The API wants a pointer to the memory block pointer for some reason (even though it's unnecessary to the implementation). Compiler won't warn if a void * is passed instead of a void **. Signed-off-by: Andrew Boie <[email protected]>
1 parent 42cfd4f commit 76a160b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/i2s/i2s_handlers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Z_SYSCALL_HANDLER(i2s_buf_read, dev, buf, size)
3030
copy_success = z_user_to_copy((void *)buf, mem_block,
3131
data_size);
3232

33-
k_mem_slab_free(rx_cfg->mem_slab, mem_block);
33+
k_mem_slab_free(rx_cfg->mem_slab, &mem_block);
3434
Z_OOPS(copy_success);
3535
Z_OOPS(z_user_to_copy((void *)size, &data_size,
3636
sizeof(data_size)));
@@ -62,7 +62,7 @@ Z_SYSCALL_HANDLER(i2s_buf_write, dev, buf, size)
6262

6363
ret = z_user_from_copy(mem_block, (void *)buf, size);
6464
if (ret) {
65-
k_mem_slab_free(tx_cfg->mem_slab, mem_block);
65+
k_mem_slab_free(tx_cfg->mem_slab, &mem_block);
6666
Z_OOPS(ret);
6767
}
6868

0 commit comments

Comments
 (0)