diff options
author | Ben Dooks | 2022-12-29 17:05:45 +0000 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-01-12 12:02:50 +0100 |
commit | 36fd385ae2ca04a95e34f52a188e3aaf985e757f (patch) | |
tree | ec1005531ac3bbedc550eaf298b9480b812cce83 /arch/riscv/kernel | |
parent | 7f56c4fa299a4f6124f00a6590d7151832b5f170 (diff) |
riscv: uaccess: fix type of 0 variable on error in get_user()
commit b9b916aee6715cd7f3318af6dc360c4729417b94 upstream.
If the get_user(x, ptr) has x as a pointer, then the setting
of (x) = 0 is going to produce the following sparse warning,
so fix this by forcing the type of 'x' when access_ok() fails.
fs/aio.c:2073:21: warning: Using plain integer as NULL pointer
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20221229170545.718264-1-ben-linux@fluff.org
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/riscv/kernel')
0 files changed, 0 insertions, 0 deletions