diff --git a/sys/dev/gem/if_gem_pci.c b/sys/dev/gem/if_gem_pci.c index 5948183dece5..30aa02bc4f1f 100644 --- a/sys/dev/gem/if_gem_pci.c +++ b/sys/dev/gem/if_gem_pci.c @@ -199,6 +199,7 @@ gem_pci_attach(dev) if (bus_setup_intr(dev, gsc->gsc_ires, INTR_TYPE_NET, gem_intr, sc, &gsc->gsc_ih) != 0) { device_printf(dev, "failed to set up interrupt\n"); + gem_detach(sc); goto fail_ires; } return (0);