drm/amdkfd: fix improper return value on error
In function kfd_wait_on_events(), when the call to copy_from_user() fails, the value of return variable ret is 0. 0 indicates success, which is inconsistent with the execution status. This patch fixes the bug by assigning "-EFAULT" to ret when copy_from_user() returns an unexpected value. Signed-off-by: NPan Bian <bianpan2016@163.com> Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
Showing
想要评论请 注册 或 登录