提交 8cfb347a 编写于 作者: A Al Viro 提交者: Catalin Marinas

arm64: Add get_user() type annotation on the !access_ok() path

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: NAl Viro <viro@zeniv.linux.org.uk>
Reported-by: Nkbuild test robot <lkp@intel.com>
Link: http://lkml.kernel.org/r/20200522142321.GP23230@ZenIV.linux.org.ukSigned-off-by: NCatalin Marinas <catalin.marinas@arm.com>
上级 1cf6022b
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册