Commit bc942083 authored by Alex Elder's avatar Alex Elder Committed by Greg Kroah-Hartman

greybus: bundle: refactor gb_bundle_find()

Rearrange gb_bundle_find() so it follows the pattern used by
gb_connection_find().
Signed-off-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 52e8ce31
...@@ -283,13 +283,13 @@ struct gb_bundle *gb_bundle_find(struct gb_interface *intf, u8 bundle_id) ...@@ -283,13 +283,13 @@ struct gb_bundle *gb_bundle_find(struct gb_interface *intf, u8 bundle_id)
spin_lock_irq(&gb_bundles_lock); spin_lock_irq(&gb_bundles_lock);
list_for_each_entry(bundle, &intf->bundles, links) list_for_each_entry(bundle, &intf->bundles, links)
if (bundle->id == bundle_id) { if (bundle->id == bundle_id)
spin_unlock_irq(&gb_bundles_lock); goto found;
return bundle; bundle = NULL;
} found:
spin_unlock_irq(&gb_bundles_lock); spin_unlock_irq(&gb_bundles_lock);
return NULL; return bundle;
} }
static int gb_bundle_connections_init(struct gb_bundle *bundle) static int gb_bundle_connections_init(struct gb_bundle *bundle)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment