mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
greybus: interface: deactivate interface on enumeration failure
Deactivate an interface immediately on enumeration failure. Note that an interface is always registered. Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
parent
4d5f621888
commit
984c9d38ae
1 changed files with 9 additions and 3 deletions
|
|
@ -484,17 +484,23 @@ static void gb_svc_process_intf_hotplug(struct gb_operation *operation)
|
|||
if (ret) {
|
||||
dev_err(&svc->dev, "failed to activate interface %u: %d\n",
|
||||
intf_id, ret);
|
||||
goto out_interface_add;
|
||||
goto err_interface_add;
|
||||
}
|
||||
|
||||
ret = gb_interface_enable(intf);
|
||||
if (ret) {
|
||||
dev_err(&svc->dev, "failed to enable interface %u: %d\n",
|
||||
intf_id, ret);
|
||||
goto out_interface_add;
|
||||
goto err_interface_deactivate;
|
||||
}
|
||||
|
||||
out_interface_add:
|
||||
gb_interface_add(intf);
|
||||
|
||||
return;
|
||||
|
||||
err_interface_deactivate:
|
||||
gb_interface_deactivate(intf);
|
||||
err_interface_add:
|
||||
gb_interface_add(intf);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue