diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-07-03 17:00:25 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-07-08 11:40:53 -0700 |
commit | 6fa1adbcdd28f27b639954e5bb202a2de281679a (patch) | |
tree | 46cccd275cd50ef817cc1393fe8760bc67fd312d /drivers/staging/greybus/manifest.c | |
parent | 9ddf133371fd87ddf543e8b26389ca26f2d9fc3c (diff) |
greybus: connection: Exit connection before destroying it
gb_connection_create() can initialize a connection if bundle->device id
is valid. And so the connection must be destroyed by calling
gb_connection_exit() before gb_connection_destroy(). This wasn't done in
the code that is parsing the manifest.
Fix it.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/manifest.c')
-rw-r--r-- | drivers/staging/greybus/manifest.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c index ce4e89c6d13e..bea565f1c1d1 100644 --- a/drivers/staging/greybus/manifest.c +++ b/drivers/staging/greybus/manifest.c @@ -255,6 +255,7 @@ cleanup: /* An error occurred; undo any changes we've made */ list_for_each_entry_safe(connection, connection_next, &bundle->connections, bundle_links) { + gb_connection_exit(connection); gb_connection_destroy(connection); count--; } |