The route for a connection needs to be set *before* we initialize
the connection.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
interface_id);
return -ENOENT;
}
+
+ ret = svc_set_route_send(interface, gmod->hd);
+ if (ret) {
+ dev_err(gmod->hd->parent, "failed to set route (%d)\n", ret);
+ return ret;
+ }
+
ret = gb_interface_connections_init(interface);
if (ret) {
dev_err(gmod->hd->parent, "module interface init error %d\n",
ret);
+ /* XXX clear route */
return ret;
}
interface->device_id = device_id;
- return svc_set_route_send(interface, gmod->hd);
+ return 0;
}