If either ed_probe_Novell or ed_attach returns an error, release the

resources too.
This commit is contained in:
Warner Losh 2005-02-09 17:35:13 +00:00
parent 7e22e3674b
commit b3f44d7907

View file

@ -84,8 +84,10 @@ ed_pci_attach(device_t dev)
int error;
error = ed_probe_Novell(dev, PCIR_BAR(0), flags);
if (error)
if (error) {
ed_release_resources(dev);
return (error);
}
error = ed_alloc_irq(dev, 0, RF_SHAREABLE);
if (error) {
@ -101,7 +103,8 @@ ed_pci_attach(device_t dev)
}
error = ed_attach(dev);
if (error)
ed_release_resources(dev);
return (error);
}