1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-21 15:45:02 +00:00

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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=141577

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);
}