From: Matt Porter Date: Tue, 28 Oct 2014 14:08:13 +0000 (-0400) Subject: greybus: connection: call connection_init hook after setting the handler X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1948 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=755a21a9bfeef4bd8145d0896a1b6f668f6d99f3;p=karo-tx-linux.git greybus: connection: call connection_init hook after setting the handler In gb_connection_init() we set the connection_handler for each supported protocol, but we never call the connection_init hook after doing so. This results in a failure being returned so fix it by calling the connection_init hook to get a good return and the associated driver initialized. Signed-off-by: Matt Porter Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index f76855c609c3..69ea3a788771 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -290,6 +290,8 @@ int gb_connection_init(struct gb_connection *connection) break; } + ret = connection->handler->connection_init(connection); + if (ret) connection->state = GB_CONNECTION_STATE_ERROR;