diff options
author | Ben Dooks <ben-linux@fluff.org> | 2022-12-29 20:05:45 +0300 |
---|---|---|
committer | Palmer Dabbelt <palmer@rivosinc.com> | 2023-01-05 23:30:41 +0300 |
commit | b9b916aee6715cd7f3318af6dc360c4729417b94 (patch) | |
tree | 32cc8c04daa042a99e9ca6c530757984d1f71089 /lib/test_ref_tracker.c | |
parent | b2d473a6019ef9a54b0156ecdb2e0398c9fa6a24 (diff) | |
download | linux-b9b916aee6715cd7f3318af6dc360c4729417b94.tar.xz |
riscv: uaccess: fix type of 0 variable on error in get_user()
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>
Diffstat (limited to 'lib/test_ref_tracker.c')
0 files changed, 0 insertions, 0 deletions