Index: uspace/drv/pciintel/pci.c
===================================================================
--- uspace/drv/pciintel/pci.c	(revision f9c03b5741ded16234379e99ce809ea66a8b9f6c)
+++ uspace/drv/pciintel/pci.c	(revision 5857be2e40c022b415aeaa6c8bbe900f882d56be)
@@ -107,9 +107,11 @@
 	}
 
-	size_t i;
-	for (i = 0; i < dev_data->hw_resources.count; i++) {
-		if (dev_data->hw_resources.resources[i].type == INTERRUPT) {
-			int irq = dev_data->hw_resources.resources[i].res.interrupt.irq;
-			int rc = async_req_1_0(irc_phone, IRC_ENABLE_INTERRUPT, irq);
+	size_t i = 0;
+	hw_resource_list_t *res = &dev_data->hw_resources;
+	for (; i < res->count; i++) {
+		if (res->resources[i].type == INTERRUPT) {
+			const int irq = res->resources[i].res.interrupt.irq;
+			const int rc =
+			    async_req_1_0(irc_phone, IRC_ENABLE_INTERRUPT, irq);
 			if (rc != EOK) {
 				async_hangup(irc_phone);
Index: uspace/srv/hw/irc/apic/apic.c
===================================================================
--- uspace/srv/hw/irc/apic/apic.c	(revision f9c03b5741ded16234379e99ce809ea66a8b9f6c)
+++ uspace/srv/hw/irc/apic/apic.c	(revision 5857be2e40c022b415aeaa6c8bbe900f882d56be)
@@ -87,4 +87,8 @@
 			async_answer_0(callid, EOK);
 			break;
+		case IPC_M_PHONE_HUNGUP:
+			/* The other side has hung up. */
+			async_answer_0(callid, EOK);
+			return;
 		default:
 			async_answer_0(callid, EINVAL);
Index: uspace/srv/hw/irc/i8259/i8259.c
===================================================================
--- uspace/srv/hw/irc/i8259/i8259.c	(revision f9c03b5741ded16234379e99ce809ea66a8b9f6c)
+++ uspace/srv/hw/irc/i8259/i8259.c	(revision 5857be2e40c022b415aeaa6c8bbe900f882d56be)
@@ -121,4 +121,8 @@
 			async_answer_0(callid, EOK);
 			break;
+		case IPC_M_PHONE_HUNGUP:
+			/* The other side has hung up. */
+			async_answer_0(callid, EOK);
+			return;
 		default:
 			async_answer_0(callid, EINVAL);
