aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryan O'Donoghue <[email protected]>2017-11-06 01:32:20 +0000
committerGreg Kroah-Hartman <[email protected]>2017-11-06 16:41:22 +0100
commit44b02da39210e6dd67e39ff1f48d30c56d384240 (patch)
tree44214f21f9f7207da8994dc571695757f430bfff
parent5a70524bbf3b2764a2e2cd32f5109fd22c8a135f (diff)
staging: greybus: loopback: Fix iteration count on async path
Commit 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") does what it says on the tin - namely, adds support for asynchronous bi-directional loopback operations. What it neglects to do though is increment the per-connection gb->iteration_count on an asynchronous operation error. This patch fixes that omission. Fixes: 12927835d211 ("greybus: loopback: Add asynchronous bi-directional support") Signed-off-by: Bryan O'Donoghue <[email protected]> Reported-by: Mitch Tasman <[email protected]> Reviewed-by: Johan Hovold <[email protected]> Cc: Alex Elder <[email protected]> Cc: Mitch Tasman <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--drivers/staging/greybus/loopback.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/staging/greybus/loopback.c b/drivers/staging/greybus/loopback.c
index 20d1b4505817..9c5980cc7791 100644
--- a/drivers/staging/greybus/loopback.c
+++ b/drivers/staging/greybus/loopback.c
@@ -1021,8 +1021,10 @@ static int gb_loopback_fn(void *data)
else if (type == GB_LOOPBACK_TYPE_SINK)
error = gb_loopback_async_sink(gb, size);
- if (error)
+ if (error) {
gb->error++;
+ gb->iteration_count++;
+ }
} else {
/* We are effectively single threaded here */
if (type == GB_LOOPBACK_TYPE_PING)