OSDN Git Service

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)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Feb 2018 00:21:01 +0000 (11:21 +1100)
commit423688abd9ab654044bddd82eb5983189eb9630d
tree02a48b03af86049be78b3ef41a7737a8ed1e3493
parent521ca5a9859a870e354d1a6b84a6ff4c07bbceb0
ocxl: Fix potential bad errno on irq allocation

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>
drivers/misc/ocxl/file.c