Skip to content

Commit

Permalink
arm64: Add get_user() type annotation on the !access_ok() path
Browse files Browse the repository at this point in the history
Sparse reports "Using plain integer as NULL pointer" when the arm64
__get_user_error() assigns 0 to a pointer type. Use proper type
annotation.

Signed-of-by: Al Viro <viro@zeniv.linux.org.uk>
Reported-by: kbuild test robot <lkp@intel.com>
Link: http://lkml.kernel.org/r/20200522142321.GP23230@ZenIV.linux.org.uk
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
  • Loading branch information
Al Viro authored and Catalin Marinas committed May 22, 2020
1 parent 1cf6022 commit 8cfb347
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/arm64/include/asm/uaccess.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ do { \
__p = uaccess_mask_ptr(__p); \
__raw_get_user((x), __p, (err)); \
} else { \
(x) = 0; (err) = -EFAULT; \
(x) = (__force __typeof__(x))0; (err) = -EFAULT; \
} \
} while (0)

Expand Down

0 comments on commit 8cfb347

Please sign in to comment.