greybus: connection: Propagate error properly
We just got an error, propagate the exact return value instead of 0.
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 557fe6d..8fe056d 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -384,7 +384,7 @@
dev_err(&connection->dev,
"Failed to connect CPort-%d (%d)\n",
cport_id, ret);
- return 0;
+ return ret;
}
}