]> git.baikalelectronics.ru Git - kernel.git/commit
ocxl: Fix return value check in afu_ioctl()
authorWei Yongjun <weiyongjun1@huawei.com>
Sat, 4 May 2019 07:04:30 +0000 (07:04 +0000)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 6 May 2019 10:21:56 +0000 (20:21 +1000)
commit05d9e722c42d36454fafe4c34a83b1346df9c628
tree89a12e24df0c9ee8acf975288c0c7800a97d67bb
parent223f96a2397693966041abbd7f1e1a18570b247b
ocxl: Fix return value check in afu_ioctl()

In case of error, the function eventfd_ctx_fdget() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().

This issue was detected by using the Coccinelle software.

Fixes: a7eeec05023a ("ocxl: move event_fd handling to frontend")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Alastair D'Silva <alastair@d-silva.org>
Acked-by: Andrew Donnellan <ajd@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
drivers/misc/ocxl/file.c