Skip to content

Commit

Permalink
drivers/flash: Correct flash_erase userspace handler
Browse files Browse the repository at this point in the history
As the erase callback is optional, handler should not check
if it is not NULL.

Fixes zephyrproject-rtos#81777

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
  • Loading branch information
de-nordic committed Nov 27, 2024
1 parent 318492b commit 4b76bce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/flash/flash_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static inline int z_vrfy_flash_write(const struct device *dev, off_t offset,
static inline int z_vrfy_flash_erase(const struct device *dev, off_t offset,
size_t size)
{
K_OOPS(K_SYSCALL_DRIVER_FLASH(dev, erase));
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_FLASH));
return z_impl_flash_erase((const struct device *)dev, offset, size);
}
#include <zephyr/syscalls/flash_erase_mrsh.c>
Expand Down

0 comments on commit 4b76bce

Please sign in to comment.