greybus: interface: disable interface on registration failures

Disable and deactivate an interface immediately on registration
failures.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
Johan Hovold 2016-04-13 19:19:00 +02:00 committed by Greg Kroah-Hartman
parent 078ef067bc
commit a530a8be39

View file

@ -518,7 +518,12 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
goto err_interface_deactivate;
}
gb_interface_add(intf);
ret = gb_interface_add(intf);
if (ret) {
gb_interface_disable(intf);
gb_interface_deactivate(intf);
return;
}
return;