Commit 78cd6777 authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: interface: gb_interface_create() isn't called for existing interfaces

The callers are ensuring that another interface doesn't exist with the
same interface id and so there is no need to check that from
gb_interface_create() anymore.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 80d1ede8
...@@ -127,13 +127,6 @@ struct gb_interface *gb_interface_create(struct greybus_host_device *hd, ...@@ -127,13 +127,6 @@ struct gb_interface *gb_interface_create(struct greybus_host_device *hd,
struct gb_interface *intf; struct gb_interface *intf;
int retval; int retval;
intf = gb_interface_find(hd, interface_id);
if (intf) {
dev_err(hd->parent, "Duplicate interface with interface-id: %d will not be created\n",
interface_id);
return NULL;
}
module = gb_module_find(hd, endo_get_module_id(hd->endo, interface_id)); module = gb_module_find(hd, endo_get_module_id(hd->endo, interface_id));
if (!module) if (!module)
return NULL; return NULL;
......
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