[PATCH linux dev-4.10] drivers (fsi): occ: Change errno for releasing client during transfer

Eddie James eajames at linux.vnet.ibm.com
Wed Nov 1 04:34:32 AEDT 2017


From: "Edward A. James" <eajames at us.ibm.com>

Clients were receiving the ECANCELED errno when the client is removed
during a transfer. Use ENODEV instead, as ECANCELED is for AIO ops.

Signed-off-by: Edward A. James <eajames at us.ibm.com>
---
 drivers/fsi/occ.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/fsi/occ.c b/drivers/fsi/occ.c
index 1fe1a54..adc64f3 100644
--- a/drivers/fsi/occ.c
+++ b/drivers/fsi/occ.c
@@ -240,9 +240,7 @@ static ssize_t occ_read_common(struct occ_client *client, char __user *ubuf,
 		spin_lock_irq(&client->lock);
 
 		if (!test_bit(XFR_COMPLETE, &xfr->flags)) {
-			if (test_bit(XFR_CANCELED, &xfr->flags))
-				rc = -ECANCELED;
-			else if (occ->cancel)
+			if (occ->cancel || test_bit(XFR_CANCELED, &xfr->flags))
 				rc = -ENODEV;
 			else
 				rc = -EINTR;
-- 
1.8.3.1



More information about the openbmc mailing list