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

Commit 2c8245c4 authored by Rob Emanuele's avatar Rob Emanuele Committed by Greg Kroah-Hartman
Browse files

USB: atmel_usba_udc: fix freeing irq in usba_udc_remove()



Add a free_irq() call on vbus gpio when we remove udc so that the
vbus irq is properly released.

Signed-off-by: default avatarRob Emanuele <rje@crystalfontz.com>
Signed-off-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 6ef9fc65
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2057,8 +2057,10 @@ static int __exit usba_udc_remove(struct platform_device *pdev)
		usba_ep_cleanup_debugfs(&usba_ep[i]);
	usba_cleanup_debugfs(udc);

	if (gpio_is_valid(udc->vbus_pin))
	if (gpio_is_valid(udc->vbus_pin)) {
		free_irq(gpio_to_irq(udc->vbus_pin), udc);
		gpio_free(udc->vbus_pin);
	}

	free_irq(udc->irq, udc);
	kfree(usba_ep);