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 <elder@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Tested-by: Alex Elder <elder@linaro.org>
Signed-off-by: Alex Elder <elder@linaro.org>
This commit is contained in:
Johan Hovold 2016-07-13 09:34:00 -05:00 committed by Alex Elder
parent c14118a841
commit 3487394988
1 changed files with 2 additions and 0 deletions

View File

@ -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);