greybus: es2: fix arpc return value
authorJohan Hovold <johan@hovoldconsulting.com>
Wed, 13 Jul 2016 14:34:00 +0000 (09:34 -0500)
committerAlex Elder <elder@linaro.org>
Wed, 13 Jul 2016 14:44:05 +0000 (09:44 -0500)
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>
drivers/staging/greybus/es2.c

index b763b27..6ada1ee 100644 (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);