mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-06 02:50:43 +00:00
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:
parent
078ef067bc
commit
a530a8be39
1 changed files with 6 additions and 1 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue