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

Commit ac90e365 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman
Browse files

usb_gadget: composite cdc gadget fault handling



These two fixes ensure the new "CDC Composite Device" gadget
fails cleanly when it's loaded on hardware that can't support
this particular gadget driver.

Signed-off-by: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c24f4227
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -124,7 +124,7 @@ static int __init cdc_do_config(struct usb_configuration *c)
		return status;
		return status;


	status = acm_bind_config(c, 0);
	status = acm_bind_config(c, 0);
	if (status == 0)
	if (status < 0)
		return status;
		return status;


	return 0;
	return 0;
+3 −0
Original line number Original line Diff line number Diff line
@@ -1090,6 +1090,9 @@ void gserial_cleanup(void)
	unsigned	i;
	unsigned	i;
	struct gs_port	*port;
	struct gs_port	*port;


	if (!gs_tty_driver)
		return;

	/* start sysfs and /dev/ttyGS* node removal */
	/* start sysfs and /dev/ttyGS* node removal */
	for (i = 0; i < n_ports; i++)
	for (i = 0; i < n_ports; i++)
		tty_unregister_device(gs_tty_driver, i);
		tty_unregister_device(gs_tty_driver, i);