mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-15 23:41:35 -04:00
greybus: manifest: release cport descriptors to avoid 'excess descriptors' warning
If we fail to initialize a cport of a bundle, we abort the entire bundle. But that leads to following (unnecessary) warnings as few of the cport descriptors, belonging to the aborted bundle were never parsed: "greybus: excess descriptors in interface manifest" Fix that by releasing all cport descriptors for the aborted bundle. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
98d7fbcad9
commit
4317f874f4
@@ -258,6 +258,19 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
|
||||
GREYBUS_PROTOCOL_CONTROL);
|
||||
exit:
|
||||
|
||||
/*
|
||||
* Free all cports for this bundle to avoid 'excess descriptors'
|
||||
* warnings.
|
||||
*/
|
||||
list_for_each_entry_safe(desc, next, &intf->manifest_descs, links) {
|
||||
struct greybus_descriptor_cport *desc_cport = desc->data;
|
||||
|
||||
if (desc->type != GREYBUS_TYPE_CPORT)
|
||||
continue;
|
||||
if (desc_cport->bundle == bundle_id)
|
||||
release_manifest_descriptor(desc);
|
||||
}
|
||||
|
||||
return 0; /* Error; count should also be 0 */
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user