]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdkfd: fix improper return value on error
authorPan Bian <bianpan2016@163.com>
Thu, 1 Dec 2016 08:10:42 +0000 (16:10 +0800)
committerOded Gabbay <oded.gabbay@gmail.com>
Mon, 16 Jan 2017 15:34:47 +0000 (17:34 +0200)
commit64bc8424d13dc967e1c07f641019c34b28052479
tree560ed3fb65402f7d379d664b7f8422327bddf385
parent4eff43b31358849360c63af6d8ed851b4027126a
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: Pan Bian <bianpan2016@163.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
drivers/gpu/drm/amd/amdkfd/kfd_events.c