Commit a530a8be authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

greybus: interface: disable interface on registration failures

Disable and deactivate an interface immediately on registration
failures.
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 078ef067
......@@ -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;
......
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