greybus: connection: fail to bind if connection init fails
authorFabien Parent <fparent@baylibre.com>
Mon, 31 Aug 2015 11:51:14 +0000 (17:21 +0530)
committerJohan Hovold <johan@hovoldconsulting.com>
Thu, 3 Sep 2015 12:46:52 +0000 (14:46 +0200)
commit50bb9ccaa0e12823e7f225ce1571d4ae3d1f83e0
treedd5df79a366e8007369ab7241fbae08caf8ee5a6
parentfda2381bd2d96b4f45806e4796d558eec678e3c6
greybus: connection: fail to bind if connection init fails

gb_connection_init() can fail and will return proper error code in that
case, but the caller is ignoring it currently.

Fix that by properly handling errors returned from gb_connection_init()
and propagating them to callers of gb_connection_bind_protocol().

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
drivers/staging/greybus/connection.c
drivers/staging/greybus/connection.h