mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-10 06:49:29 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9ddf133371
commit
6fa1adbcdd
@@ -255,6 +255,7 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
|
||||
/* 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--;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user