]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
ocxl: Fix potential bad errno on irq allocation
authorFrederic Barrat <fbarrat@linux.vnet.ibm.com>
Fri, 16 Feb 2018 13:01:18 +0000 (14:01 +0100)
committerSeth Forshee <seth.forshee@canonical.com>
Tue, 27 Mar 2018 19:51:13 +0000 (14:51 -0500)
commit994c994544f7709b3e9c149c91410ba6c89feaab
tree2acf2b82ebe1f63fe364733463af90b1f614c6d6
parentdeefef64cafbf60c3383b73248fdbe2ff8654139
ocxl: Fix potential bad errno on irq allocation

BugLink: http://bugs.launchpad.net/bugs/1755161
Fix some issues found by a static checker:

When allocating an AFU interrupt, if the driver cannot copy the output
parameters to userland, the errno value was not set to EFAULT

Remove a (now) useless cast.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
Acked-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit 423688abd9ab654044bddd82eb5983189eb9630d)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
drivers/misc/ocxl/file.c