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

Commit 5492f6f8 authored by Dmitry Torokhov's avatar Dmitry Torokhov
Browse files

Input: acecad - simplify usb_acecad_disconnect()



There is no need to check whether acecad structure is attached to the
interface; if it isn't and we are called we have much bigger problems.
Also no need to call usb_kill_urb() in usb_acecad_disconnect() since
it is being called in usb_acecad_close().

Signed-off-by: default avatarDmitry Torokhov <dtor@mail.ru>
parent 2ef2ed59
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -252,14 +252,12 @@ static void usb_acecad_disconnect(struct usb_interface *intf)
	struct usb_acecad *acecad = usb_get_intfdata(intf);

	usb_set_intfdata(intf, NULL);
	if (acecad) {
		usb_kill_urb(acecad->irq);

	input_unregister_device(acecad->input);
	usb_free_urb(acecad->irq);
		usb_buffer_free(interface_to_usbdev(intf), 8, acecad->data, acecad->data_dma);
	usb_buffer_free(acecad->usbdev, 8, acecad->data, acecad->data_dma);
	kfree(acecad);
}
}

static struct usb_device_id usb_acecad_id_table [] = {
	{ USB_DEVICE(USB_VENDOR_ID_ACECAD, USB_DEVICE_ID_FLAIR), .driver_info = 0 },