in manifest.c [388:427]
static bool gb_manifest_parse_interface(struct gb_interface *intf,
struct manifest_desc *interface_desc)
{
struct greybus_descriptor_interface *desc_intf = interface_desc->data;
struct gb_control *control = intf->control;
char *str;
/* Handle the strings first--they can fail */
str = gb_string_get(intf, desc_intf->vendor_stringid);
if (IS_ERR(str))
return false;
control->vendor_string = str;
str = gb_string_get(intf, desc_intf->product_stringid);
if (IS_ERR(str))
goto out_free_vendor_string;
control->product_string = str;
/* Assign feature flags communicated via manifest */
intf->features = desc_intf->features;
/* Release the interface descriptor, now that we're done with it */
release_manifest_descriptor(interface_desc);
/* An interface must have at least one bundle descriptor */
if (!gb_manifest_parse_bundles(intf)) {
dev_err(&intf->dev, "manifest bundle descriptors not valid\n");
goto out_err;
}
return true;
out_err:
kfree(control->product_string);
control->product_string = NULL;
out_free_vendor_string:
kfree(control->vendor_string);
control->vendor_string = NULL;
return false;
}