Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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;