Skip to content

Commit fe8dc82

Browse files
de-nordicdkalowsk
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]> (cherry picked from commit 4864289)
1 parent 17df0f1 commit fe8dc82

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
@@ -31,7 +31,7 @@ static inline int z_vrfy_flash_write(const struct device *dev, off_t offset,
3131
static inline int z_vrfy_flash_erase(const struct device *dev, off_t offset,
3232
size_t size)
3333
{
34-
K_OOPS(K_SYSCALL_DRIVER_FLASH(dev, erase));
34+
K_OOPS(K_SYSCALL_OBJ(dev, K_OBJ_DRIVER_FLASH));
3535
return z_impl_flash_erase((const struct device *)dev, offset, size);
3636
}
3737
#include <zephyr/syscalls/flash_erase_mrsh.c>

0 commit comments

Comments
 (0)