Skip to content

Commit 4864289

Browse files
de-nordickartben
authored andcommitted
drivers/flash: Correct flash_erase userspace handler
As the erase callback is optional, handler should not check if it is not NULL. Fixes #81777 Signed-off-by: Dominik Ermel <[email protected]>
1 parent a09a186 commit 4864289

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/flash/flash_handlers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ static inline int z_vrfy_flash_write(const struct device *dev, off_t offset,
3232
static inline int z_vrfy_flash_erase(const struct device *dev, off_t offset,
3333
size_t size)
3434
{
35-
K_OOPS(K_SYSCALL_DRIVER_FLASH(dev, erase));
35+
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_FLASH));
3636
return z_impl_flash_erase((const struct device *)dev, offset, size);
3737
}
3838
#include <zephyr/syscalls/flash_erase_mrsh.c>

0 commit comments

Comments
 (0)