From 34873949885ad66f9bc6ad6baff78aed4846c092 Mon Sep 17 00:00:00 2001 From: Johan Hovold Date: Wed, 13 Jul 2016 09:34:00 -0500 Subject: [PATCH] greybus: es2: fix arpc return value ARPC should return 0 on success, but instead was returning the number of jiffies left until the timeout. This caused cport_reset() to report an error and an incorrect error message to be printed when disabling a connection. Reported-by: Alex Elder Signed-off-by: Johan Hovold Tested-by: Alex Elder Signed-off-by: Alex Elder --- drivers/staging/greybus/es2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/greybus/es2.c b/drivers/staging/greybus/es2.c index b763b27..6ada1ee 100644 --- a/drivers/staging/greybus/es2.c +++ b/drivers/staging/greybus/es2.c @@ -1204,6 +1204,8 @@ static int arpc_sync(struct es2_ap_dev *es2, u8 type, void *payload, *result = rpc->resp->result; if (*result) retval = -EREMOTEIO; + else + retval = 0; out_arpc_del: spin_lock_irqsave(&es2->arpc_lock, flags); -- 2.7.4