x86, apic: Restore irqs on fail paths